add liblas (#1426)
* update openblas * add liblas * add patch * fix1 * fix2 * fix3 * fix4pull/1429/head
parent
1865b61c40
commit
d9f8ee2465
3 changed files with 99 additions and 0 deletions
@ -0,0 +1,55 @@ |
|||||||
|
diff --git a/include/liblas/detail/binary.hpp b/include/liblas/detail/binary.hpp
|
||||||
|
index d3116a1..ab20e06 100644
|
||||||
|
--- a/include/liblas/detail/binary.hpp
|
||||||
|
+++ b/include/liblas/detail/binary.hpp
|
||||||
|
@@ -17,6 +17,8 @@
|
||||||
|
#ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED
|
||||||
|
#define LIBLAS_DETAIL_BINARY_HPP_INCLUDED
|
||||||
|
|
||||||
|
+#include <liblas/detail/endian.hpp>
|
||||||
|
+
|
||||||
|
#include <cassert>
|
||||||
|
#include <climits>
|
||||||
|
#include <cstring>
|
||||||
|
@@ -25,7 +27,6 @@
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/static_assert.hpp>
|
||||||
|
-#include <boost/detail/endian.hpp>
|
||||||
|
#include <boost/type_traits/is_signed.hpp>
|
||||||
|
|
||||||
|
#if CHAR_BIT != 8
|
||||||
|
@@ -43,7 +44,7 @@ namespace detail { namespace binary {
|
||||||
|
struct big_endian_tag {};
|
||||||
|
struct little_endian_tag {};
|
||||||
|
|
||||||
|
-#ifdef BOOST_BIG_ENDIAN
|
||||||
|
+#ifdef LIBLAS_BIG_ENDIAN
|
||||||
|
typedef big_endian_tag native_endian_tag;
|
||||||
|
#else
|
||||||
|
typedef little_endian_tag native_endian_tag;
|
||||||
|
diff --git a/src/c_api.cpp b/src/c_api.cpp
|
||||||
|
index a70fe74..e8be785 100644
|
||||||
|
--- a/src/c_api.cpp
|
||||||
|
+++ b/src/c_api.cpp
|
||||||
|
@@ -96,6 +96,7 @@ using namespace liblas;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <boost/lambda/lambda.hpp>
|
||||||
|
+#include <boost/bind.hpp>
|
||||||
|
|
||||||
|
bool IsReprojectionTransform(liblas::TransformPtr const& p)
|
||||||
|
{
|
||||||
|
diff --git a/src/header.cpp b/src/header.cpp
|
||||||
|
index 9987ce1..a5c8f7d 100644
|
||||||
|
--- a/src/header.cpp
|
||||||
|
+++ b/src/header.cpp
|
||||||
|
@@ -54,7 +54,7 @@
|
||||||
|
// boost
|
||||||
|
#include <boost/cstdint.hpp>
|
||||||
|
#include <boost/lambda/lambda.hpp>
|
||||||
|
-
|
||||||
|
+#include <boost/bind.hpp>
|
||||||
|
//std
|
||||||
|
#include <algorithm>
|
||||||
|
#include <fstream>
|
@ -0,0 +1,41 @@ |
|||||||
|
package("liblas") |
||||||
|
|
||||||
|
set_homepage("https://liblas.org/index.html") |
||||||
|
set_description("libLAS - LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset") |
||||||
|
set_license("BSD-3-Clause") |
||||||
|
|
||||||
|
add_urls("http://download.osgeo.org/liblas/libLAS-$(version).tar.bz2") |
||||||
|
add_versions("1.8.1", "9adb4a98c63b461ed2bc82e214ae522cbd809cff578f28511122efe6c7ea4e76") |
||||||
|
|
||||||
|
add_patches("1.8.1", path.join(os.scriptdir(), "patches", "1.8.1", "header.patch"), "fde1c186e78472f4eb8902f28b51b18a8b40166379c710b43f89323aac7c3afd") |
||||||
|
|
||||||
|
add_deps("cmake", "libgeotiff") |
||||||
|
add_deps("boost", {configs = {program_options = true, |
||||||
|
thread = true, |
||||||
|
system = true, |
||||||
|
iostreams = true, |
||||||
|
filesystem = true}}) |
||||||
|
on_install("windows", "macosx", "linux", function (package) |
||||||
|
io.replace("CMakeLists.txt", "JPEG", "PROJ", {plain = true}) |
||||||
|
io.replace("src/CMakeLists.txt", "${GDAL_LIBRARY}", "${PROJ_LIBRARIES}", {plain = true}) |
||||||
|
local configs = {"-DWITH_TESTS=OFF", "-DWITH_LASZIP=OFF", "-DWITH_GDAL=OFF", "-DBUILD_OSGEO4W=OFF", "-DBoost_USE_STATIC_LIBS=ON"} |
||||||
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) |
||||||
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) |
||||||
|
if package:is_plat("windows") then |
||||||
|
table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF")) |
||||||
|
end |
||||||
|
import("package.tools.cmake").install(package, configs) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:check_cxxsnippets({test = [[ |
||||||
|
#include <liblas/liblas.hpp> |
||||||
|
#include <fstream> |
||||||
|
void test() { |
||||||
|
std::ifstream ifs; |
||||||
|
ifs.open("file.las", std::ios::in | std::ios::binary); |
||||||
|
liblas::ReaderFactory f; |
||||||
|
liblas::Reader reader = f.CreateWithStream(ifs); |
||||||
|
} |
||||||
|
]]}, {configs = {languages = "c++11"}})) |
||||||
|
end) |
Loading…
Reference in new issue