[libe57] Update to 1.1.337 (#49656)

This commit is contained in:
SunBlack
2026-02-03 14:57:12 -08:00
committed by GitHub
parent 7c45dcccbe
commit 8542c1247d
16 changed files with 167 additions and 375 deletions
-107
View File
@@ -1,107 +0,0 @@
diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2012-04-04 13:09:12.000000000 +0800
+++ b/CMakeLists.txt 2021-06-16 01:14:35.669163100 +0800
@@ -31,6 +31,8 @@
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_flag_overrides.cmake)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
# Set a private module find path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
@@ -81,17 +83,17 @@
endif(NOT Boost_FOUND)
set(Xerces_USE_STATIC_LIBS On)
-find_package(Xerces QUIET)
-if (NOT Xerces_FOUND)
+find_package(XercesC QUIET)
+if (NOT XercesC_FOUND)
set(XERCES_ROOT CACHE PATH "Location of the xerces library")
message(FATAL_ERROR
"Unable to find xerces library.
Please set the the XERCES_ROOT to point to the root of the xerces directory."
)
-endif (NOT Xerces_FOUND)
+endif (NOT XercesC_FOUND)
-set(XML_LIBRARIES ${Xerces_LIBRARY})
-set(XML_INCLUDE_DIRS ${Xerces_INCLUDE_DIR})
+set(XML_LIBRARIES ${XercesC_LIBRARY})
+set(XML_INCLUDE_DIRS ${XercesC_INCLUDE_DIR})
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_definitions(-DLINUX)
@@ -187,12 +189,18 @@
add_executable( las2e57
src/tools/las2e57.cpp
)
+
+if (MSVC)
+ set(LAS2E57_EXTRA_LINK bcrypt)
+endif(MSVC)
+
target_link_libraries( las2e57
E57RefImpl
LASReader
time_conversion
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${LAS2E57_EXTRA_LINK}
)
add_executable( e57fields
src/tools/e57fields.cpp
@@ -270,15 +270,32 @@
install(
FILES
include/E57Foundation.h
+ include/E57Simple.h
+ include/LASReader.h
DESTINATION include/e57
)
+install(
+ FILES
+ include/time_conversion/time_conversion.h
+ include/time_conversion/basictypes.h
+ include/time_conversion/constants.h
+ include/time_conversion/gnss_error.h
+ DESTINATION include/e57/time_conversion
+)
install(
FILES
CHANGES.TXT
README.TXT
src/refimpl/E57RefImplConfig.cmake
- DESTINATION .
+ DESTINATION share/e57refimpl
+)
+
+install(
+ FILES
+ README.TXT
+ RENAME copyright
+ DESTINATION share/libe57
)
#include (InstallRequiredSystemLibraries)
--- a/src/refimpl/E57RefImplConfig.cmake 2011-10-06 16:01:00.000000000 +0800
+++ b/src/refimpl/E57RefImplConfig.cmake 2022-03-01 16:48:29.117485600 +0800
@@ -49,6 +49,8 @@
# NOTE: You will also need to include the boost and xerces libraries to your
# project.
+get_filename_component(E57RefImpl_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
+
IF (NOT "${E57RefImpl_DIR}/include" EQUAL "${E57RefImpl_INCLUDE_DIR}")
SET(E57RefImpl_LIBRARY_DEBUG E57RefImpl_LIBRARY_DEBUG-NOTFOUND)
SET(E57RefImpl_LIBRARY_RELEASE E57RefImpl_LIBRARY_RELEASE-NOTFOUND)
@@ -78,6 +80,6 @@
NAMES libE57RefImpl-d
E57RefImpl-d
- HINTS ${E57RefImpl_DIR}/lib
+ HINTS ${E57RefImpl_DIR}/debug/lib
DOC "E57 debug library"
)
@@ -1,95 +0,0 @@
diff --color -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2013-04-03 22:24:08.000000000 +0800
+++ b/CMakeLists.txt 2022-03-01 17:23:01.210728200 +0800
@@ -36,8 +36,9 @@
# If you find any errors or have suggestion to improve the build script:
# patches are most welcome! Please send them to the development mailing list.
+cmake_minimum_required(VERSION 3.1)
-cmake_minimum_required(VERSION 2.8.2)
+set(CMAKE_CXX_STANDARD 14)
# Override flags to enable prepare for linking to static runtime
set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/c_flag_overrides.cmake)
diff --color -Naur a/src/tools/e57fields.cpp b/src/tools/e57fields.cpp
--- a/src/tools/e57fields.cpp 2012-04-04 17:19:01.000000000 +0800
+++ b/src/tools/e57fields.cpp 2022-03-01 17:24:17.904911600 +0800
@@ -30,11 +30,7 @@
#include <iomanip>
#include <float.h>
#include <map>
-#if defined(_MSC_VER)
-# include <memory>
-#else
-# include <tr1/memory>
-#endif
+#include <memory>
#include "E57Foundation.h"
#include "E57FoundationImpl.h" //??? for exceptions, should be in separate file
@@ -43,7 +39,6 @@
using namespace e57;
using namespace std;
-using namespace std::tr1;
//!!! prologue, file name, date, version#, total # elements
//!!! doc
@@ -446,9 +441,9 @@
/// Only one is used, depending on the type of the E57 element.
/// One of these three should be resized to BUFFER_ELEMENT_COUNT.
/// These are smart pointers to avoid the copying (and the moving) when put on the cvElements list.
- shared_ptr<vector<int64_t> > iBuffer;
- shared_ptr<vector<double> > dBuffer;
- shared_ptr<vector<string> > sBuffer;
+ std::shared_ptr<vector<int64_t> > iBuffer;
+ std::shared_ptr<vector<double> > dBuffer;
+ std::shared_ptr<vector<string> > sBuffer;
/// The precalculated parts of the element path name.
/// The only part that is missing is the record number which goes in between.
diff --color -Naur a/src/tools/e57unpack.cpp b/src/tools/e57unpack.cpp
--- a/src/tools/e57unpack.cpp 2013-04-03 22:24:08.000000000 +0800
+++ b/src/tools/e57unpack.cpp 2022-03-01 17:25:15.206260200 +0800
@@ -45,12 +45,8 @@
#include <stdexcept>
using std::runtime_error;
-#if defined(_MSC_VER)
-# include <memory>
-#else
-# include <tr1/memory>
-#endif
-using std::tr1::shared_ptr;
+#include <memory>
+using std::shared_ptr;
#include <string>
using std::string;
diff --color -Naur a/src/tools/e57validate.cpp b/src/tools/e57validate.cpp
--- a/src/tools/e57validate.cpp 2011-10-06 16:01:00.000000000 +0800
+++ b/src/tools/e57validate.cpp 2022-03-01 17:25:46.220771800 +0800
@@ -66,11 +66,7 @@
================================================================*/
-#if defined(_MSC_VER)
-# include <unordered_map>
-#else
-# include <tr1/unordered_map>
-using std::tr1::unordered_map;
-#endif
+#include <unordered_map>
+using std::unordered_map;
#include <cstring>
using std::strlen;
@@ -694,7 +691,7 @@
void dump(int indent = 0, std::ostream& os = std::cout);
//================
private:
- typedef std::tr1::unordered_map<int64_t, LineGroup> GroupsMap;
+ typedef std::unordered_map<int64_t, LineGroup> GroupsMap;
bool isDefined_;
bool isByRow_;
-145
View File
@@ -1,145 +0,0 @@
diff -x '.*' -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt 2021-06-24 16:56:37.000000000 +0800
+++ b/CMakeLists.txt 2021-06-24 17:30:28.000000000 +0800
@@ -163,6 +163,13 @@
include/time_conversion/gnss_error.h
)
+# fix dependency introduced by xerces
+if(APPLE)
+ find_library(CORE_FOUNDATION CoreFoundation REQUIRED)
+ find_library(CORE_SERVICES CoreServices REQUIRED)
+ set(EXTRA_LINK_FLAGS_OSX ${CORE_FOUNDATION} ${CORE_SERVICES})
+endif()
+
#
# Example programs
#
@@ -174,6 +181,7 @@
E57RefImpl
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
add_executable( DemoRead01
src/examples/DemoRead01.cpp
@@ -182,6 +190,7 @@
E57RefImpl
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
#
@@ -203,6 +212,7 @@
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${LAS2E57_EXTRA_LINK}
+ ${EXTRA_LINK_FLAGS_OSX}
)
add_executable( e57fields
src/tools/e57fields.cpp
@@ -211,6 +221,7 @@
E57RefImpl
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
add_executable( e57xmldump
src/tools/e57xmldump.cpp
@@ -219,6 +230,7 @@
E57RefImpl
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
add_executable( e57validate
src/tools/e57validate.cpp
@@ -227,6 +239,7 @@
E57RefImpl
${XML_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
add_executable( e57unpack
src/tools/e57unpack.cpp
@@ -236,6 +249,7 @@
${XML_LIBRARIES}
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LINK_FLAGS_OSX}
)
#
diff -x '.*' -Naur a/src/refimpl/E57FoundationImpl.cpp b/src/refimpl/E57FoundationImpl.cpp
--- a/src/refimpl/E57FoundationImpl.cpp 2012-04-12 21:44:42.000000000 +0800
+++ b/src/refimpl/E57FoundationImpl.cpp 2021-06-24 17:04:57.000000000 +0800
@@ -57,6 +57,12 @@
# include <fcntl.h>
# define O_BINARY (0)
# define _unlink unlink
+#elif defined( __APPLE__ )
+# include <sys/types.h>
+# include <unistd.h>
+# include <fcntl.h>
+# define O_BINARY (0)
+# define _unlink unlink
#else
# error "no supported OS platform defined"
#endif
@@ -4764,6 +4770,8 @@
# endif
#elif defined(LINUX)
int64_t result = ::lseek64(fd_, offset, whence);
+#elif defined( __APPLE__ )
+ int64_t result = ::lseek(fd_, offset, whence);
#else
# error "no supported OS platform defined"
#endif
diff -x '.*' -Naur a/src/refimpl/E57Simple.cpp b/src/refimpl/E57Simple.cpp
--- a/src/refimpl/E57Simple.cpp 2011-05-14 05:40:11.000000000 +0800
+++ b/src/refimpl/E57Simple.cpp 2021-06-24 16:58:24.000000000 +0800
@@ -799,6 +799,9 @@
# define __LARGE64_FILES
# include <sys/types.h>
# include <unistd.h>
+#elif defined( __APPLE__ )
+# include <sys/types.h>
+# include <unistd.h>
#else
# error "no supported OS platform defined"
#endif
diff -x '.*' -Naur a/src/refimpl/E57SimpleImpl.cpp b/src/refimpl/E57SimpleImpl.cpp
--- a/src/refimpl/E57SimpleImpl.cpp 2012-04-12 23:15:46.000000000 +0800
+++ b/src/refimpl/E57SimpleImpl.cpp 2021-06-24 16:58:24.000000000 +0800
@@ -74,6 +74,12 @@
# include <boost/uuid/uuid.hpp>
# include <boost/uuid/uuid_generators.hpp>
# include <boost/uuid/uuid_io.hpp>
+#elif defined(__APPLE__)
+# include <sys/types.h>
+# include <unistd.h>
+# include <boost/uuid/uuid.hpp>
+# include <boost/uuid/uuid_generators.hpp>
+# include <boost/uuid/uuid_io.hpp>
#else
# error "no supported OS platform defined"
#endif
diff -x '.*' -Naur a/src/tools/las2e57.cpp b/src/tools/las2e57.cpp
--- a/src/tools/las2e57.cpp 2012-04-04 19:09:11.000000000 +0800
+++ b/src/tools/las2e57.cpp 2021-06-24 17:11:11.000000000 +0800
@@ -404,12 +404,12 @@
int64_t startIndex;
BoundingBox bbox;
- GroupRecord(int64_t id);
+ GroupRecord(int64_t id = 0);
void addMember(double coords[3], int64_t recordIndex);
void dump(int indent = 0, std::ostream& os = std::cout);
};
-GroupRecord::GroupRecord(int64_t id_arg = 0)
+GroupRecord::GroupRecord(int64_t id_arg)
: id(id_arg),
count(0),
startIndex(0),
+15
View File
@@ -0,0 +1,15 @@
diff --git a/src/refimpl/E57SimpleImpl.cpp b/src/refimpl/E57SimpleImpl.cpp
index db71548..981c8e5 100644
--- a/src/refimpl/E57SimpleImpl.cpp
+++ b/src/refimpl/E57SimpleImpl.cpp
@@ -51,10 +51,6 @@
# include <sys\stat.h>
# include <windows.h>
//#include <stdint.h> //if you need this then remove <boost/cstdint.hpp> in E57Foundation.h line 48
-#pragma warning(disable:4996)
-# include <boost/uuid/uuid.hpp>
-# include <boost/uuid/uuid_generators.hpp>
-# include <boost/uuid/uuid_io.hpp>
# elif defined(__GNUC__)
# define _LARGEFILE64_SOURCE
# define __LARGE64_FILES
+15
View File
@@ -0,0 +1,15 @@
diff --git a/include/E57Simple.h b/include/E57Simple.h
index 6686523..5751921 100644
--- a/include/E57Simple.h
+++ b/include/E57Simple.h
@@ -57,6 +57,10 @@
#include "E57Foundation.h"
#endif
+#ifdef WIN32
+#include <windows.h>
+#endif
+
using namespace std;
using namespace boost;
+31
View File
@@ -0,0 +1,31 @@
diff --git a/src/refimpl/E57RefImplConfig.cmake b/src/refimpl/E57RefImplConfig.cmake
index 8ba7356..84a8453 100644
--- a/src/refimpl/E57RefImplConfig.cmake
+++ b/src/refimpl/E57RefImplConfig.cmake
@@ -116,6 +116,17 @@ IF (E57RefImpl_LIBRARY_DEBUG AND NOT E57RefImpl_LIBRARY_RELEASE)
SET(E57RefImpl_LIBRARIES ${E57RefImpl_LIBRARY_DEBUG})
ENDIF()
+include(CMakeFindDependencyMacro)
+find_dependency(Boost COMPONENTS crc smart_ptr uuid)
+find_dependency(XercesC)
+
+list(APPEND E57RefImpl_LIBRARIES
+ Boost::crc
+ Boost::smart_ptr
+ Boost::uuid
+ XercesC::XercesC
+)
+
IF (E57RefImpl_LIBRARY)
set(E57RefImpl_LIBRARY ${E57RefImpl_LIBRARY} CACHE FILEPATH "The E57RefImpl library")
# Remove superfluous "debug" / "optimized" keywords from
@@ -134,7 +145,7 @@ ELSE(E57RefImpl_LIBRARY)
ENDIF(E57RefImpl_LIBRARY)
IF (E57RefImpl_FOUND)
- SET(E57RefImpl_INCLUDE_DIRS ${E57RefImpl_INCLUDE_DIR} "E57RefImpl include directory")
+ SET(E57RefImpl_INCLUDE_DIRS ${E57RefImpl_INCLUDE_DIR})
ENDIF()
+23 -20
View File
@@ -1,27 +1,22 @@
set(VERSION 1.1.332)
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/E57RefImpl_src-${VERSION}")
vcpkg_from_sourceforge(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO e57-3d-imgfmt
FILENAME "E57RefImpl_src-${VERSION}.zip"
SHA512 86adb88cff32d72905e923b1205d609a2bce2eabd78995c59a7957395b233766a5ce31481db08977117abc1a70bbed90d2ce0cdb9897704a8c63d992e91a3907
PATCHES
"0001_cmake.patch"
"0002_replace_tr1_with_cpp11.patch"
"0003_fix_osx_support.patch"
REPO hlrs-vis/libe57
REF "v${VERSION}"
SHA512 2acea522f2ac8e86414a4839d57407c7ae5473d2532b73bf2bdd72e0bd0a138c89d770de067ae1ebf488b614ab53c99e7f2a67cea31eea64e94c1ae2c539321b
HEAD_REF main
PATCHES
boost_includes.patch
e57simple.patch
export_config.patch
xercesc.patch
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
if(NOT VCPKG_BUILD_TYPE)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/share/libe57")
endif()
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake PACKAGE_NAME e57refimpl)
vcpkg_copy_pdbs()
vcpkg_copy_tools(
@@ -29,7 +24,15 @@ vcpkg_copy_tools(
AUTO_CLEAN
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/e57refimpl/CHANGES.TXT")
file(REMOVE "${CURRENT_PACKAGES_DIR}/share/e57refimpl/README.TXT")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/doc"
)
file(WRITE "${CURRENT_BUILDTREES_DIR}/copyright"
"See the libE57 website for copyright and licensing information (http://libe57.org/license.html)."
)
vcpkg_install_copyright(FILE_LIST "${CURRENT_BUILDTREES_DIR}/copyright")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+5
View File
@@ -0,0 +1,5 @@
libe57 provides CMake integration:
find_package(E57RefImpl CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${E57RefImpl_LIBRARIES})
target_include_directories(main PRIVATE ${E57RefImpl_INCLUDE_DIRS})
+1 -6
View File
@@ -1,7 +1,6 @@
{
"name": "libe57",
"version-semver": "1.1.332",
"port-version": 5,
"version-semver": "1.1.337",
"description": "An open source implementation of the ASTM E2807 Standard Specification for 3D Imaging Data Exchange in the C++ language.",
"homepage": "http://www.libe57.org/",
"license": "BSL-1.0",
@@ -16,10 +15,6 @@
"boost-thread",
"boost-uuid",
"boost-variant",
{
"name": "icu",
"platform": "linux"
},
{
"name": "vcpkg-cmake",
"host": true
+31
View File
@@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfd9574..a28be3e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,23 +99,13 @@ Please set the BOOST_ROOT to point to the boost distribution files."
)
endif(NOT Boost_FOUND)
-find_package(Xerces)
-if (NOT Xerces_FOUND)
- set(XERCES_ROOT CACHE PATH "Location of the xerces library")
- message(FATAL_ERROR
-"Unable to find xerces library.
-Please set the the XERCES_ROOT to point to the root of the xerces directory."
-)
-endif (NOT Xerces_FOUND)
+find_package(XercesC REQUIRED)
-set(XML_LIBRARIES ${Xerces_LIBRARY})
-set(XML_INCLUDE_DIRS ${Xerces_INCLUDE_DIR})
+set(XML_LIBRARIES XercesC::XercesC)
+set(XML_INCLUDE_DIRS "")
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
add_definitions(-DLINUX)
- find_package(ICU REQUIRED)
- set(XML_LIBRARIES ${XML_LIBRARIES} ${ICU_LIBRARIES})
- set(XML_INCLUDE_DIRS ${XML_INCLUDE_DIRS} ${ICU_INCLUDE_DIRS})
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_definitions(-DWINDOWS)
endif()
@@ -0,0 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_cmake_configure(SOURCE_PATH "${CURRENT_PORT_DIR}/project")
vcpkg_cmake_build()
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(libe57-test CXX)
set(CMAKE_CXX_STANDARD 14)
add_executable(main main.cpp)
find_package(E57RefImpl CONFIG REQUIRED)
target_link_libraries(main PRIVATE ${E57RefImpl_LIBRARIES})
target_include_directories(main PRIVATE ${E57RefImpl_INCLUDE_DIRS})
@@ -0,0 +1,13 @@
#include <e57/E57Simple.h>
int main() {
int astmMajor = 0;
int astmMinor = 0;
e57::ustring libraryId;
e57::E57Utilities utils;
utils.getVersions(astmMajor, astmMinor, libraryId);
e57::Reader reader("");
return 0;
}
@@ -0,0 +1,12 @@
{
"name": "vcpkg-ci-libe57",
"version-string": "ci",
"description": "Validates libe57",
"dependencies": [
"libe57",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
+2 -2
View File
@@ -4841,8 +4841,8 @@
"port-version": 0
},
"libe57": {
"baseline": "1.1.332",
"port-version": 5
"baseline": "1.1.337",
"port-version": 0
},
"libe57format": {
"baseline": "3.3.0",
+5
View File
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c2b3d3c65277520ef8cc05d163848d0c8e73303f",
"version-semver": "1.1.337",
"port-version": 0
},
{
"git-tree": "5150b00289fee6bf002f6b08bc92ed1fe39d17ee",
"version-semver": "1.1.332",