Skip to content

Commit a4cfba0

Browse files
authored
[lastools] Update to 2.0.3 (#40273)
1 parent 96ce497 commit a4cfba0

File tree

8 files changed

+114
-48
lines changed

8 files changed

+114
-48
lines changed

ports/lastools/build-tools.diff

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 6a0ea6e..9e119c5 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -16,7 +16,10 @@ if (BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
6+
endif()
7+
8+
add_subdirectory(LASlib/src)
9+
+option(BUILD_TOOLS "" OFF)
10+
+if(BUILD_TOOLS)
11+
add_subdirectory(src)
12+
+endif()
13+
if (EXISTS src_full)
14+
add_subdirectory(src_full)
15+
endif()
Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt
2-
index 1b170bf..408628c 100644
3-
--- a/LASlib/src/CMakeLists.txt
4-
+++ b/LASlib/src/CMakeLists.txt
5-
@@ -99,17 +99,9 @@ if(MSVC)
6-
)
7-
endif()
8-
9-
+install(TARGETS LASlib EXPORT laslib-targets
10-
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
11-
install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib)
12-
13-
-if (MSVC)
14-
- foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
15-
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib)
16-
- endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
17-
-else()
18-
- install(TARGETS LASlib EXPORT laslib-targets
19-
- ARCHIVE DESTINATION lib/LASlib
20-
- LIBRARY DESTINATION lib/LASlib
21-
- RUNTIME DESTINATION lib/LASlib)
22-
- install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib)
23-
- install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib)
24-
-endif(MSVC)
25-
+install(EXPORT laslib-targets DESTINATION share/lastools/LASlib)
26-
+install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION share/lastools/LASlib)
1+
diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt
2+
index 51dca48..97a25c4 100644
3+
--- a/LASlib/src/CMakeLists.txt
4+
+++ b/LASlib/src/CMakeLists.txt
5+
@@ -104,15 +104,13 @@ endif()
6+
7+
install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib)
8+
9+
-if (MSVC)
10+
+if (0)
11+
foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
12+
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib)
13+
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
14+
else()
15+
install(TARGETS LASlib EXPORT laslib-targets
16+
- ARCHIVE DESTINATION lib/LASlib
17+
- LIBRARY DESTINATION lib/LASlib
18+
- RUNTIME DESTINATION lib/LASlib)
19+
+ )
20+
install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib)
21+
install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib)
22+
-endif(MSVC)
23+
+endif(0)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
diff --git a/LASzip/src/lasmessage.cpp b/LASzip/src/lasmessage.cpp
2+
index c39d13a..e7d70cd 100644
3+
--- a/LASzip/src/lasmessage.cpp
4+
+++ b/LASzip/src/lasmessage.cpp
5+
@@ -139,8 +139,8 @@ void las_default_message_handler(LAS_MESSAGE_TYPE type, const char* msg, void* u
6+
if (!prefix.empty())
7+
{
8+
format_message(message, (unsigned)prefix.size());
9+
- fprintf(stderr, prefix.c_str());
10+
- fprintf(stderr, message.c_str());
11+
+ fputs(prefix.c_str(), stderr);
12+
+ fputs(message.c_str(), stderr);
13+
}
14+
else
15+
{
16+
diff --git a/src/geoprojectionconverter.cpp b/src/geoprojectionconverter.cpp
17+
index 1e3298d..6a80699 100644
18+
--- a/src/geoprojectionconverter.cpp
19+
+++ b/src/geoprojectionconverter.cpp
20+
@@ -4366,7 +4366,7 @@ bool GeoProjectionConverter::set_VerticalCSTypeGeoKey(short value, char* descrip
21+
// this is where the name ends
22+
line[run] = '\0';
23+
}
24+
- if (description) sprintf(description, name);
25+
+ if (description) sprintf(description, "%s", name);
26+
run++;
27+
// skip two commas
28+
while (line[run] != ',') run++;

ports/lastools/portfile.cmake

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
2-
message(FATAL_ERROR "${PORT} doesn't currently support UWP.")
3-
endif()
4-
5-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
6-
71
vcpkg_from_github(
82
OUT_SOURCE_PATH SOURCE_PATH
93
REPO LAStools/LAStools
10-
REF 2bbbfa918df01b7f364d176610e9785bceb4d5de
11-
SHA512 3744aa9e50150261cc3a52272a4cdeafdb4f678a6f6a986a9549c2efead6b4c69bc3d9a6f9f302140ce363d6da965e47b63c0310364307e9caa82c86f75a509f
4+
REF "v${VERSION}"
5+
SHA512 cb150562b09c5a79df1e2c730481ceda340f235e1efb7824564d1f95a9981eada087af06bc3907a777a55d315a1521fb8a09249f2aeefd9e40e6c783b9c7a11c
126
HEAD_REF master
137
PATCHES
14-
"fix_install_paths_lastools.patch"
15-
"fix_include_directories_lastools.patch"
8+
fix_install_paths_lastools.patch
9+
fix_include_directories_lastools.patch
10+
build-tools.diff
11+
insecure-fprintf.diff
12+
signed-char.diff
13+
)
14+
15+
vcpkg_check_features(OUT_FEATURE_OPTIONS options
16+
FEATURES
17+
tools BUILD_TOOLS
1618
)
1719

1820
vcpkg_cmake_configure(
1921
SOURCE_PATH "${SOURCE_PATH}"
22+
OPTIONS
23+
${options}
24+
OPTIONS_DEBUG
25+
-DBUILD_TOOLS=OFF
2026
)
21-
2227
vcpkg_cmake_install()
28+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/LASlib PACKAGE_NAME laslib)
2329

24-
vcpkg_cmake_config_fixup(PACKAGE_NAME LASlib CONFIG_PATH share/lastools/LASlib)
30+
if(BUILD_TOOLS)
31+
vcpkg_copy_tools(TOOL_NAMES las2las64 las2txt64 lascopcindex64 lasdiff64 lasindex64 lasinfo64 lasmerge64 lasprecision64 laszip64 txt2las64 AUTO_CLEAN)
32+
endif()
2533

2634
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
27-
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
28-
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
29-
endif()
3035
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
3136

32-
# Handle copyright
33-
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
37+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/COPYING.txt")

ports/lastools/signed-char.diff

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/las2txt.cpp b/src/las2txt.cpp
2+
index 7c8a841..196ec65 100644
3+
--- a/src/las2txt.cpp
4+
+++ b/src/las2txt.cpp
5+
@@ -570,7 +570,7 @@ enum extended_flags{HSV = -1, HSL = -2, HSV255 = -3, HSL255 = -4};
6+
static void parse_extended_flags(char *parse_string)
7+
{
8+
const char *extended_flags[] = {"(HSV)", "(HSL)", "(hsv)", "(hsl)"};
9+
- const char replacement_codes[] = {HSV255, HSL255, HSV, HSL};
10+
+ const signed char replacement_codes[] = {HSV255, HSL255, HSV, HSL};
11+
I32 nflags = (I32)(sizeof(extended_flags) / sizeof(char*));
12+
13+
for (I32 i = 0; i < nflags; i++)

ports/lastools/vcpkg.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "lastools",
3-
"version": "2.0.2+20230206",
4-
"port-version": 1,
3+
"version": "2.0.3",
54
"description": "LAStools: award-winning software for efficient LiDAR processing (with LASzip)",
65
"homepage": "https://github.com/LAStools/LAStools",
76
"supports": "!uwp",
@@ -14,5 +13,10 @@
1413
"name": "vcpkg-cmake-config",
1514
"host": true
1615
}
17-
]
16+
],
17+
"features": {
18+
"tools": {
19+
"description": "Build tools"
20+
}
21+
}
1822
}

versions/baseline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4137,8 +4137,8 @@
41374137
"port-version": 6
41384138
},
41394139
"lastools": {
4140-
"baseline": "2.0.2+20230206",
4141-
"port-version": 1
4140+
"baseline": "2.0.3",
4141+
"port-version": 0
41424142
},
41434143
"laszip": {
41444144
"baseline": "3.4.4",

versions/l-/lastools.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "ef0c4018e358e6adb7835f43588e759537401811",
5+
"version": "2.0.3",
6+
"port-version": 0
7+
},
38
{
49
"git-tree": "c8eec220c3958c88af0050876e69d8b7f5d3d945",
510
"version": "2.0.2+20230206",

0 commit comments

Comments
 (0)