aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/laszip
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/laszip
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/laszip')
-rw-r--r--vcpkg/ports/laszip/compiler-options.diff33
-rw-r--r--vcpkg/ports/laszip/format-string.diff15
-rw-r--r--vcpkg/ports/laszip/portfile.cmake27
-rw-r--r--vcpkg/ports/laszip/vcpkg.json17
4 files changed, 92 insertions, 0 deletions
diff --git a/vcpkg/ports/laszip/compiler-options.diff b/vcpkg/ports/laszip/compiler-options.diff
new file mode 100644
index 0000000..af6220e
--- /dev/null
+++ b/vcpkg/ports/laszip/compiler-options.diff
@@ -0,0 +1,33 @@
+diff --git a/cmake/unix_compiler_options.cmake b/cmake/unix_compiler_options.cmake
+index 0a6550f..65a9f4c 100644
+--- a/cmake/unix_compiler_options.cmake
++++ b/cmake/unix_compiler_options.cmake
+@@ -1,4 +1,4 @@
+-set(LASZIP_COMMON_CXX_FLAGS "-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include"
++set(LASZIP_COMMON_CXX_FLAGS "-Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas"
+ )
+
+ if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+diff --git a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake
+index 95049b8..d252d83 100644
+--- a/cmake/win32_compiler_options.cmake
++++ b/cmake/win32_compiler_options.cmake
+@@ -45,8 +45,6 @@ if (MSVC)
+ include(ProcessorCount)
+ ProcessorCount(N)
+ if(NOT N EQUAL 0)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP${N}")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP${N}")
+ endif()
+ endif()
+
+@@ -77,9 +75,6 @@ add_definitions(-DWIN32_LEAN_AND_MEAN)
+ # message(STATUS "Setting PDAL build type - ${CMAKE_BUILD_TYPE}")
+ #endif()
+
+-set(CMAKE_INCLUDE_PATH "c:/OSGeo4W64/include;$ENV{CMAKE_INCLUDE_PATH}")
+-set(CMAKE_LIBRARY_PATH "c:/OSGeo4W64/lib;$ENV{CMAKE_LIBRARY_PATH}")
+-set(CMAKE_PREFIX_PATH "c:/OSGeo4W64/cmake;$ENV{CMAKE_LIBRARY_PATH}")
+
+ #ABELL - WHY?
+ set(PDAL_PLATFORM_WIN32 1)
diff --git a/vcpkg/ports/laszip/format-string.diff b/vcpkg/ports/laszip/format-string.diff
new file mode 100644
index 0000000..891378b
--- /dev/null
+++ b/vcpkg/ports/laszip/format-string.diff
@@ -0,0 +1,15 @@
+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/vcpkg/ports/laszip/portfile.cmake b/vcpkg/ports/laszip/portfile.cmake
new file mode 100644
index 0000000..f73774a
--- /dev/null
+++ b/vcpkg/ports/laszip/portfile.cmake
@@ -0,0 +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")
diff --git a/vcpkg/ports/laszip/vcpkg.json b/vcpkg/ports/laszip/vcpkg.json
new file mode 100644
index 0000000..6a42814
--- /dev/null
+++ b/vcpkg/ports/laszip/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "laszip",
+ "version": "3.4.4",
+ "description": "LASzip - free and lossless LiDAR compression",
+ "homepage": "https://laszip.org/",
+ "license": "Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}