diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL index 3db5c51ac..1065a5c2d 100644 --- a/ports/pdal/CONTROL +++ b/ports/pdal/CONTROL @@ -1,4 +1,4 @@ Source: pdal -Version: 1.7.1-1 +Version: 1.7.1-2 Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. Build-Depends: gdal, geos, jsoncpp, libgeotiff diff --git a/ports/pdal/no-source-dir-writes.patch b/ports/pdal/no-source-dir-writes.patch new file mode 100644 index 000000000..f7ec12f6b --- /dev/null +++ b/ports/pdal/no-source-dir-writes.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc146d1..9b82544 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1) + + configure_file( + "${PROJECT_SOURCE_DIR}/gitsha.cpp.in" +- "${PROJECT_SOURCE_DIR}/pdal/gitsha.cpp") ++ "${PROJECT_BINARY_DIR}/pdal/gitsha.cpp") + + # needs to come before configuration of pdal_features + if(APPLE) +@@ -201,6 +201,7 @@ file(GLOB BASE_SRCS + ${PDAL_IO_DIR}/*.cpp + ${PDAL_KERNELS_DIR}/*.cpp + ${PDAL_SRC_DIR}/*.cpp ++ ${PROJECT_BINARY_DIR}/pdal/gitsha.cpp + ${PDAL_SRC_DIR}/compression/*.cpp) + file(GLOB_RECURSE PRIVATE_SRCS + ${PDAL_FILTERS_DIR}/private/*.cpp +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index b02aa4a..d60b041 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -66,9 +66,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdal.pc + if(UNIX OR APPLE) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS +@@ -85,9 +85,9 @@ if(UNIX OR APPLE) + elseif(WIN32) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config-bat.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index f9b413218..cbcb97ced 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -14,11 +14,14 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src + SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CURRENT_PORT_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/no-source-dir-writes.patch ) +file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") + # Deploy custom CMake modules to enforce expected dependencies look-up foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF) file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake")