mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:41:47 +08:00
[lastools] Update to 2.0.3 (#40273)
This commit is contained in:
parent
96ce497722
commit
a4cfba036f
15
ports/lastools/build-tools.diff
Normal file
15
ports/lastools/build-tools.diff
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6a0ea6e..9e119c5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -16,7 +16,10 @@ if (BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
add_subdirectory(LASlib/src)
|
||||
+option(BUILD_TOOLS "" OFF)
|
||||
+if(BUILD_TOOLS)
|
||||
add_subdirectory(src)
|
||||
+endif()
|
||||
if (EXISTS src_full)
|
||||
add_subdirectory(src_full)
|
||||
endif()
|
@ -1,26 +1,23 @@
|
||||
diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt
|
||||
index 1b170bf..408628c 100644
|
||||
index 51dca48..97a25c4 100644
|
||||
--- a/LASlib/src/CMakeLists.txt
|
||||
+++ b/LASlib/src/CMakeLists.txt
|
||||
@@ -99,17 +99,9 @@ if(MSVC)
|
||||
)
|
||||
endif()
|
||||
@@ -104,15 +104,13 @@ endif()
|
||||
|
||||
+install(TARGETS LASlib EXPORT laslib-targets
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib)
|
||||
|
||||
-if (MSVC)
|
||||
- foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
|
||||
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib)
|
||||
- endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
|
||||
-else()
|
||||
- install(TARGETS LASlib EXPORT laslib-targets
|
||||
+if (0)
|
||||
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib)
|
||||
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
|
||||
else()
|
||||
install(TARGETS LASlib EXPORT laslib-targets
|
||||
- ARCHIVE DESTINATION lib/LASlib
|
||||
- LIBRARY DESTINATION lib/LASlib
|
||||
- RUNTIME DESTINATION lib/LASlib)
|
||||
- install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib)
|
||||
- install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib)
|
||||
+ )
|
||||
install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib)
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib)
|
||||
-endif(MSVC)
|
||||
+install(EXPORT laslib-targets DESTINATION share/lastools/LASlib)
|
||||
+install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION share/lastools/LASlib)
|
||||
+endif(0)
|
||||
|
28
ports/lastools/insecure-fprintf.diff
Normal file
28
ports/lastools/insecure-fprintf.diff
Normal file
@ -0,0 +1,28 @@
|
||||
diff --git a/LASzip/src/lasmessage.cpp b/LASzip/src/lasmessage.cpp
|
||||
index c39d13a..e7d70cd 100644
|
||||
--- a/LASzip/src/lasmessage.cpp
|
||||
+++ b/LASzip/src/lasmessage.cpp
|
||||
@@ -139,8 +139,8 @@ void las_default_message_handler(LAS_MESSAGE_TYPE type, const char* msg, void* u
|
||||
if (!prefix.empty())
|
||||
{
|
||||
format_message(message, (unsigned)prefix.size());
|
||||
- fprintf(stderr, prefix.c_str());
|
||||
- fprintf(stderr, message.c_str());
|
||||
+ fputs(prefix.c_str(), stderr);
|
||||
+ fputs(message.c_str(), stderr);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/src/geoprojectionconverter.cpp b/src/geoprojectionconverter.cpp
|
||||
index 1e3298d..6a80699 100644
|
||||
--- a/src/geoprojectionconverter.cpp
|
||||
+++ b/src/geoprojectionconverter.cpp
|
||||
@@ -4366,7 +4366,7 @@ bool GeoProjectionConverter::set_VerticalCSTypeGeoKey(short value, char* descrip
|
||||
// this is where the name ends
|
||||
line[run] = '\0';
|
||||
}
|
||||
- if (description) sprintf(description, name);
|
||||
+ if (description) sprintf(description, "%s", name);
|
||||
run++;
|
||||
// skip two commas
|
||||
while (line[run] != ',') run++;
|
@ -1,33 +1,37 @@
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} doesn't currently support UWP.")
|
||||
endif()
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO LAStools/LAStools
|
||||
REF 2bbbfa918df01b7f364d176610e9785bceb4d5de
|
||||
SHA512 3744aa9e50150261cc3a52272a4cdeafdb4f678a6f6a986a9549c2efead6b4c69bc3d9a6f9f302140ce363d6da965e47b63c0310364307e9caa82c86f75a509f
|
||||
REF "v${VERSION}"
|
||||
SHA512 cb150562b09c5a79df1e2c730481ceda340f235e1efb7824564d1f95a9981eada087af06bc3907a777a55d315a1521fb8a09249f2aeefd9e40e6c783b9c7a11c
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"fix_install_paths_lastools.patch"
|
||||
"fix_include_directories_lastools.patch"
|
||||
fix_install_paths_lastools.patch
|
||||
fix_include_directories_lastools.patch
|
||||
build-tools.diff
|
||||
insecure-fprintf.diff
|
||||
signed-char.diff
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS options
|
||||
FEATURES
|
||||
tools BUILD_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${options}
|
||||
OPTIONS_DEBUG
|
||||
-DBUILD_TOOLS=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LASlib PACKAGE_NAME laslib)
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME LASlib CONFIG_PATH share/lastools/LASlib)
|
||||
if(BUILD_TOOLS)
|
||||
vcpkg_copy_tools(TOOL_NAMES las2las64 las2txt64 lascopcindex64 lasdiff64 lasindex64 lasinfo64 lasmerge64 lasprecision64 laszip64 txt2las64 AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Handle copyright
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/COPYING.txt")
|
||||
|
13
ports/lastools/signed-char.diff
Normal file
13
ports/lastools/signed-char.diff
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/las2txt.cpp b/src/las2txt.cpp
|
||||
index 7c8a841..196ec65 100644
|
||||
--- a/src/las2txt.cpp
|
||||
+++ b/src/las2txt.cpp
|
||||
@@ -570,7 +570,7 @@ enum extended_flags{HSV = -1, HSL = -2, HSV255 = -3, HSL255 = -4};
|
||||
static void parse_extended_flags(char *parse_string)
|
||||
{
|
||||
const char *extended_flags[] = {"(HSV)", "(HSL)", "(hsv)", "(hsl)"};
|
||||
- const char replacement_codes[] = {HSV255, HSL255, HSV, HSL};
|
||||
+ const signed char replacement_codes[] = {HSV255, HSL255, HSV, HSL};
|
||||
I32 nflags = (I32)(sizeof(extended_flags) / sizeof(char*));
|
||||
|
||||
for (I32 i = 0; i < nflags; i++)
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "lastools",
|
||||
"version": "2.0.2+20230206",
|
||||
"port-version": 1,
|
||||
"version": "2.0.3",
|
||||
"description": "LAStools: award-winning software for efficient LiDAR processing (with LASzip)",
|
||||
"homepage": "https://github.com/LAStools/LAStools",
|
||||
"supports": "!uwp",
|
||||
@ -14,5 +13,10 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4137,8 +4137,8 @@
|
||||
"port-version": 6
|
||||
},
|
||||
"lastools": {
|
||||
"baseline": "2.0.2+20230206",
|
||||
"port-version": 1
|
||||
"baseline": "2.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
"laszip": {
|
||||
"baseline": "3.4.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ef0c4018e358e6adb7835f43588e759537401811",
|
||||
"version": "2.0.3",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "c8eec220c3958c88af0050876e69d8b7f5d3d945",
|
||||
"version": "2.0.2+20230206",
|
||||
|
Loading…
Reference in New Issue
Block a user