From d8e5d78feee165e23e54e6d000b2a5314409934d Mon Sep 17 00:00:00 2001 From: toge Date: Thu, 1 Jan 2026 01:11:13 +0900 Subject: [PATCH] [laszip] update to 3.5.0 (#48774) --- ports/laszip/compiler-options.diff | 30 +++++++++++++++++ ports/laszip/format-string.diff | 15 --------- ports/laszip/include-cstdint.patch | 12 +++++++ ports/laszip/portfile.cmake | 54 +++++++++++++++--------------- ports/laszip/vcpkg.json | 3 +- versions/baseline.json | 2 +- versions/l-/laszip.json | 5 +++ 7 files changed, 77 insertions(+), 44 deletions(-) delete mode 100644 ports/laszip/format-string.diff create mode 100644 ports/laszip/include-cstdint.patch diff --git a/ports/laszip/compiler-options.diff b/ports/laszip/compiler-options.diff index af6220ec3a..249833f79c 100644 --- a/ports/laszip/compiler-options.diff +++ b/ports/laszip/compiler-options.diff @@ -1,3 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 12db977..78e373f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,12 +6,6 @@ string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) + + set(ROOT_DIR "${PROJECT_SOURCE_DIR}") + +-if (MSVC) +- add_compile_options("/std:c++17") +-else() +- add_compile_options(-std=c++17) +-endif() +- + if(CMAKE_GNU_COMPILER_ID OR CMAKE_Clang_COMPILER_ID) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-security -Wno-format-truncation") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-security -Wno-format-truncation -std=c++17") +diff --git a/cmake/macros.cmake b/cmake/macros.cmake +index cd23260..a687a61 100644 +--- a/cmake/macros.cmake ++++ b/cmake/macros.cmake +@@ -64,7 +64,7 @@ macro(LASZIP_ADD_LIBRARY _name) + CLEAN_DIRECT_OUTPUT 1 + FOLDER Libraries + ) +- set_property(TARGET ${_name} PROPERTY CXX_STANDARD 11) ++ set_property(TARGET ${_name} PROPERTY CXX_STANDARD 17) + + install(TARGETS ${_name} + EXPORT LASZIPTargets diff --git a/cmake/unix_compiler_options.cmake b/cmake/unix_compiler_options.cmake index 0a6550f..65a9f4c 100644 --- a/cmake/unix_compiler_options.cmake diff --git a/ports/laszip/format-string.diff b/ports/laszip/format-string.diff deleted file mode 100644 index 891378b7be..0000000000 --- a/ports/laszip/format-string.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/lasmessage.cpp b/src/lasmessage.cpp -index c39d13a..a1e2d0d 100644 ---- a/src/lasmessage.cpp -+++ b/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()); -+ fprintf(stderr, "%s", prefix.c_str()); -+ fprintf(stderr, "%s", message.c_str()); - } - else - { diff --git a/ports/laszip/include-cstdint.patch b/ports/laszip/include-cstdint.patch new file mode 100644 index 0000000000..25e1a9a29f --- /dev/null +++ b/ports/laszip/include-cstdint.patch @@ -0,0 +1,12 @@ +diff --git a/src/mydefs.cpp b/src/mydefs.cpp +index ab9f3bf..722272d 100644 +--- a/src/mydefs.cpp ++++ b/src/mydefs.cpp +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/ports/laszip/portfile.cmake b/ports/laszip/portfile.cmake index f73774ae5b..83eb2cc4e3 100644 --- a/ports/laszip/portfile.cmake +++ b/ports/laszip/portfile.cmake @@ -1,27 +1,27 @@ -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO LASzip/LASzip - REF ${VERSION} - SHA512 163204a4d0bb4b4371a1a63eb8ba9477dc504d7e171ec3d75c3120ace7ab682df517b4583efd951c8c7ac1be03bde8c8c327586e36c8884cbf7e98ec1e1c27bf - HEAD_REF master - PATCHES - compiler-options.diff - format-string.diff -) - -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC) - -vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC} -) - -vcpkg_cmake_install() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Remove laszip_api3 dll since it doesn't export functions properly during build. -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll") -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll") - -vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LASzip/LASzip + REF ${VERSION} + SHA512 6cdc38249ace8191dae454817fe5f5a3cd22b24c7065daa0e4a3eaaca4d698540c56affa06e15de88aea2912a82033d1dc93f5d3904190a896edf1204af865f5 + HEAD_REF master + PATCHES + compiler-options.diff + include-cstdint.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC} +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +# Remove laszip_api3 dll since it doesn't export functions properly during build. +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.txt") diff --git a/ports/laszip/vcpkg.json b/ports/laszip/vcpkg.json index 6a42814a9d..cd0bb8c2e1 100644 --- a/ports/laszip/vcpkg.json +++ b/ports/laszip/vcpkg.json @@ -1,9 +1,10 @@ { "name": "laszip", - "version": "3.4.4", + "version": "3.5.0", "description": "LASzip - free and lossless LiDAR compression", "homepage": "https://laszip.org/", "license": "Apache-2.0", + "supports": "!uwp", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/versions/baseline.json b/versions/baseline.json index 38cbbb2b38..57b0eafab4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4465,7 +4465,7 @@ "port-version": 0 }, "laszip": { - "baseline": "3.4.4", + "baseline": "3.5.0", "port-version": 0 }, "launch-darkly-server": { diff --git a/versions/l-/laszip.json b/versions/l-/laszip.json index f32ce753a9..0c3b01a2eb 100644 --- a/versions/l-/laszip.json +++ b/versions/l-/laszip.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2fdfbcdcbd5c1c0adef37ef34b1be173a7bb84c3", + "version": "3.5.0", + "port-version": 0 + }, { "git-tree": "775e13e090dcbf53186bfce9ddaf3a9f62afdf66", "version": "3.4.4",