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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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