Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update laszip to v3.4.4 #23731

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions recipes/laszip/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"3.4.3":
url: "https://github.com/LASzip/LASzip/releases/download/3.4.3/laszip-src-3.4.3.tar.bz2"
sha256: "5775eb0b97de1b77514d47534cc65c6cfb5bebdd8aed0e47a23af8e75b7ea887"
"3.4.4":
url: "https://github.com/LASzip/LASzip/archive/refs/tags/3.4.4.tar.gz"
sha256: "6d034bf3a400f81317a5dbad59d1b7ce82d971e887ca22d15813b914f0a5c281"
patches:
"3.4.3":
- patch_file: "patches/0001-no-build-laszip-api.patch"

Check warning on line 10 in recipes/laszip/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0001-no- ... ^ (line: 10)
- patch_file: "patches/0002-no-rpath-and-relocatable-macos.patch"

Check warning on line 11 in recipes/laszip/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0002-no- ... ^ (line: 11)
"3.4.4":
- patch_file: "patches/0001-3.4.4-no-build-laszip-api.patch"

Check warning on line 13 in recipes/laszip/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0001-3.4 ... ^ (line: 13)
- patch_file: "patches/0002-3.4.4-no-rpath-and-relocatable-macos.patch"

Check warning on line 14 in recipes/laszip/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0002-3.4 ... ^ (line: 14)
- patch_file: "patches/0003-3.4.4-remove-cppstd-hardcode.patch"
patch_type: "conan"
patch_description: "Let Conan set the cppstd, instead of forcing it (In this version it's incorreclty set to C++17 instead of the supported C++14)"
12 changes: 11 additions & 1 deletion recipes/laszip/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from conan import ConanFile
from conan.tools.build import stdcpp_library
from conan.tools.build import stdcpp_library, check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get
from conan.tools.scm import Version
Expand Down Expand Up @@ -27,6 +27,10 @@ class LaszipConan(ConanFile):
"fPIC": True,
}

@property
def _min_cppstd(self):
return 14

def export_sources(self):
export_conandata_patches(self)

Expand All @@ -35,8 +39,14 @@ def config_options(self):
del self.options.fPIC

def configure(self):
if Version(self.version) >= "3.4.4":
self.license = "Apache-2.0"
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
if self.options.shared:
self.options.rm_safe("fPIC")

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)

def layout(self):
cmake_layout(self, src_folder="src")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- a/dll/CMakeLists.txt
+++ b/dll/CMakeLists.txt
@@ -2,5 +2,4 @@ set(LASZIP_API_SOURCES
laszip_api.c
)

-LASZIP_ADD_LIBRARY(${LASZIP_API_LIB_NAME} ${LASZIP_API_SOURCES})
LASZIP_ADD_INCLUDES("laszip" "${CMAKE_CURRENT_SOURCE_DIR}/laszip_api.h" ${LASZIP_API_VERSION_H})
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,15 +81,11 @@ file(MAKE_DIRECTORY "${LASZIP_OUTPUT_BIN_DIR}")
# per http://www.cmake.org/Wiki/CMake_RPATH_handling
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
IF (APPLE)
SET(MACOSX_RPATH ON)
endif()
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/${LASZIP_LIB_INSTALL_DIR}" isSystemDir)
-IF("${isSystemDir}" STREQUAL "-1")
- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LASZIP_LIB_INSTALL_DIR}")
-ENDIF("${isSystemDir}" STREQUAL "-1")

# wipe lib/ drectory on clean. It will have plugins that could be out of date
# in the next build
--- a/cmake/macros.cmake
+++ b/cmake/macros.cmake
@@ -71,8 +71,6 @@ macro(LASZIP_ADD_LIBRARY _name)
LIBRARY DESTINATION ${LASZIP_LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LASZIP_LIB_INSTALL_DIR})
if (APPLE)
- set_target_properties(${_name} PROPERTIES INSTALL_NAME_DIR
- "@executable_path/../lib")
endif()
endmacro(LASZIP_ADD_LIBRARY)

12 changes: 12 additions & 0 deletions recipes/laszip/all/patches/0003-3.4.4-remove-cppstd-hardcode.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b0a02b..a9cc6b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(LASZIP CXX C)
-set(CMAKE_CXX_STANDARD 17)
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)

set(ROOT_DIR "${PROJECT_SOURCE_DIR}")
2 changes: 2 additions & 0 deletions recipes/laszip/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"3.4.4":
folder: all
"3.4.3":
folder: all
Loading