File: 0001-Fix-usage-of-non-vendored-laszip.patch

package info (click to toggle)
python-laszip 0.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: cpp: 906; sh: 53; makefile: 5; python: 1
file content (123 lines) | stat: -rw-r--r-- 3,003 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Mon, 8 Dec 2025 22:26:20 +0100
Subject: Fix usage of non-vendored laszip

---
 cmake/FindLASzip.cmake | 7 +++----
 src/lasunzipper.cpp    | 4 ----
 src/lasunzipper.h      | 4 ----
 src/laszip.cpp         | 4 ----
 src/laszip_error.h     | 4 ----
 src/laszipper.h        | 4 ----
 6 files changed, 3 insertions(+), 24 deletions(-)

diff --git a/cmake/FindLASzip.cmake b/cmake/FindLASzip.cmake
index 2e69a3a..bf7acf8 100644
--- a/cmake/FindLASzip.cmake
+++ b/cmake/FindLASzip.cmake
@@ -1,8 +1,6 @@
 include(FindPackageHandleStandardArgs)
 # TODO laszip_api && laszip version from header
 
-message(FATALL_ERROR "toolchain: ${CMAKE_TOOLCHAIN_FILE}")
-
 if (DEFINED ENV{CONDA_PREFIX})
     set(CONDA_INCLUDE_DIR $ENV{CONDA_PREFIX}/Library/include)
     if (WIN32)
@@ -20,7 +18,8 @@ find_library(LASZIP_LIBRARY
         )
 
 find_path(LASZIP_INCLUDE_DIR
-        NAMES laszip
+        NAMES laszip_api.h
+        PATH_SUFFIXES laszip
         HINTS /usr/include
         /usr/local/include
         "${CONDA_INCLUDE_DIR}"
@@ -59,4 +58,4 @@ if (LASzip_FOUND AND NOT TARGET LASzip::LASzip)
                 IMPORTED_LOCATION ${LASZIP_LIBRARY})
     endif ()
     target_include_directories(LASzip::LASzip INTERFACE ${LASZIP_INCLUDE_DIR})
-endif ()
\ No newline at end of file
+endif ()
diff --git a/src/lasunzipper.cpp b/src/lasunzipper.cpp
index 1a17431..1adf80f 100644
--- a/src/lasunzipper.cpp
+++ b/src/lasunzipper.cpp
@@ -1,11 +1,7 @@
 #include "lasunzipper.h"
 #include "laszip_error.h"
 
-#ifdef USE_VENDORED_LASZIP
 #include <laszip_api.h>
-#else
-#include <laszip/laszip_api.h>
-#endif
 
 #include <algorithm>
 #include <limits>
diff --git a/src/lasunzipper.h b/src/lasunzipper.h
index ce6e796..6ac3b4f 100644
--- a/src/lasunzipper.h
+++ b/src/lasunzipper.h
@@ -5,11 +5,7 @@
 
 #include <pybind11/pybind11.h>
 
-#ifdef USE_VENDORED_LASZIP
 #include <laszip_api.h>
-#else
-#include <laszip/laszip_api.h>
-#endif
 
 #include <sstream>
 
diff --git a/src/laszip.cpp b/src/laszip.cpp
index 09ca4ee..349b42a 100644
--- a/src/laszip.cpp
+++ b/src/laszip.cpp
@@ -7,11 +7,7 @@
 #include <pybind11/numpy.h>
 #include <pybind11/pybind11.h>
 
-#ifdef USE_VENDORED_LASZIP
 #include <laszip_api.h>
-#else
-#include <laszip/laszip_api.h>
-#endif
 
 #include <utility>
 
diff --git a/src/laszip_error.h b/src/laszip_error.h
index 3924494..45af6fd 100644
--- a/src/laszip_error.h
+++ b/src/laszip_error.h
@@ -1,11 +1,7 @@
 #ifndef LASZIP_BIND_LASZIP_ERROR_H
 #define LASZIP_BIND_LASZIP_ERROR_H
 
-#ifdef USE_VENDORED_LASZIP
 #include <laszip_api.h>
-#else
-#include <laszip/laszip_api.h>
-#endif
 
 class laszip_error : public std::runtime_error
 {
diff --git a/src/laszipper.h b/src/laszipper.h
index 5fc0a33..9ef5a77 100644
--- a/src/laszipper.h
+++ b/src/laszipper.h
@@ -7,11 +7,7 @@
 
 #include "python_ostreambuf.h"
 
-#ifdef USE_VENDORED_LASZIP
 #include <laszip_api.h>
-#else
-#include <laszip/laszip_api.h>
-#endif
 
 namespace py = pybind11;