diff options
| author | Jaime Soto <jsoto@simverge.com> | 2018-07-19 20:40:19 -0400 |
|---|---|---|
| committer | Jaime Soto <jsoto@simverge.com> | 2019-01-21 22:05:25 -0500 |
| commit | 7bc18139e37b4a9db949bc96bfb13c22f59f8d37 (patch) | |
| tree | 359166fed23b8c881594a709d605292ce4d361f5 | |
| parent | c6db2c880a064b29e0b38eda29f19510235fb4c9 (diff) | |
| download | vcpkg-7bc18139e37b4a9db949bc96bfb13c22f59f8d37.tar.gz vcpkg-7bc18139e37b4a9db949bc96bfb13c22f59f8d37.zip | |
[pdal-c] Add pdal-c port files
| -rw-r--r-- | ports/pdal-c/CONTROL | 4 | ||||
| -rw-r--r-- | ports/pdal-c/fix-docs-version.patch | 14 | ||||
| -rw-r--r-- | ports/pdal-c/portfile.cmake | 42 | ||||
| -rw-r--r-- | ports/pdal-c/preserve-install-dir.patch | 13 | ||||
| -rw-r--r-- | ports/pdal-c/remove-tests.patch | 12 |
5 files changed, 85 insertions, 0 deletions
diff --git a/ports/pdal-c/CONTROL b/ports/pdal-c/CONTROL new file mode 100644 index 000000000..8dcde3f5b --- /dev/null +++ b/ports/pdal-c/CONTROL @@ -0,0 +1,4 @@ +Source: pdal-c +Version: 1.8 +Description: C API for the Point Data Abstraction Library (PDAL) +Build-Depends: pdal diff --git a/ports/pdal-c/fix-docs-version.patch b/ports/pdal-c/fix-docs-version.patch new file mode 100644 index 000000000..d44b50b61 --- /dev/null +++ b/ports/pdal-c/fix-docs-version.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..c8a325a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,8 @@ set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "CMake RelWithDebInfo suffix") + set(PDALC_ENABLE_CODE_COVERAGE ON CACHE BOOL "Enable code coverage calculation") + set(PDALC_GCC_PARAM_GGC_MIN_HEAPSIZE "131072" CACHE STRING "GCC garbage collection minimum heap size") + +-include(ObtainProjectVersion) ++set(${PROJECT_NAME}_VERSION "1.8") ++set(BUILD_ID "vcpkg build") + include_directories("${CMAKE_SOURCE_DIR}/source") + + if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/ports/pdal-c/portfile.cmake b/ports/pdal-c/portfile.cmake new file mode 100644 index 000000000..4e1a51b72 --- /dev/null +++ b/ports/pdal-c/portfile.cmake @@ -0,0 +1,42 @@ +# vcpkg portfile.cmake for pdal-c, the C API for PDAL + +include(vcpkg_common_functions) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building will not support load data through plugins.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PDAL/CAPI + REF 1.8 + SHA512 6a5f4cb3d36b419f3cd195028c3e6dc17abf3cdb7495aa3df638bc1f842ba98243c73e051e9cfcd3afe22787309cb871374b152ded92e6e06f404cd7b1ae50bf + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-docs-version.patch + ${CMAKE_CURRENT_LIST_DIR}/preserve-install-dir.patch + ${CMAKE_CURRENT_LIST_DIR}/remove-tests.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDALC_ENABLE_CODE_COVERAGE:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove headers from debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Install copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal-c + RENAME copyright +) diff --git a/ports/pdal-c/preserve-install-dir.patch b/ports/pdal-c/preserve-install-dir.patch new file mode 100644 index 000000000..87377ab2f --- /dev/null +++ b/ports/pdal-c/preserve-install-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..075c86c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,8 +13,6 @@ set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + +-# Install to the build directory +-set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefix" FORCE) + + # Use "d" suffix for debug builds + # Do not use a suffix for RelWithDebInfo diff --git a/ports/pdal-c/remove-tests.patch b/ports/pdal-c/remove-tests.patch new file mode 100644 index 000000000..c50914e57 --- /dev/null +++ b/ports/pdal-c/remove-tests.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..e31e552 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,3 @@ endif() + + add_subdirectory("source/pdal") + add_subdirectory("doc") +- +-include(CTest) +-add_subdirectory("tests/data") +-add_subdirectory("tests/pdal") |
