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