274.3. pdal-2.10.2
Point cloud translation and processing: LAS/LAZ, E57, Draco, HDF and the pdal tool
| Version | 2.10.2, release 1 |
| Shelf | gis — GIS, maps, projections, GPS, navigation and location |
| Phase | 43_toolkits (Toolkits), 147 of 344 in build order |
| Licence | BSD-3-Clause |
| Homepage | https://pdal.io/ |
| Build time | 14.8 SBU |
| Installed size | 19.3 MiB in 391 files |
| Recipe | ports/core/gis/pdal/kpkgbuild |
About
PDAL (the Point Data Abstraction Library) translates and processes point clouds, such as lidar scans and photogrammetry output: readers and writers for LAS and LAZ and other formats, filters that are chained into pipelines, and the pdal command that runs them. It is built on gdal and proj for coordinate systems, and qgis links it for its point-cloud layers.
Sources
pdal-2.10.2.tar.bz2(97.3 MiB)
sha256882b97aa3ae5db682c3b2dc8edef4e29bcc7ecea51c70592e71bc1f34112ad00
upstream: https://github.com/PDAL/PDAL/releases/download/2.10.2/PDAL-2.10.2-src.tar.bz2
archive copy: sources-2/gis--pdal-2.10.2.tar.bz2
Dependencies
Depends on: cmake, ninja, pkgconf, gdal, proj, libgeotiff, curl, libxml2, zlib, zstd, xz, hdf5, postgresql, draco, xerces-c, ceres-solver, eigen.
Required by (1): qgis.
Patches
build.sh applies these; kpkg applies nothing by itself.
10-zstd.patch— Incmake/zstd.cmake, replacesfind_package(zstd CONFIG QUIET)with a requiredpkg_check_modules(ZSTD libzstd), and inCMakeLists.txtlinks${ZSTD_LIBRARIES}instead of thezstd::libzstdtarget. The zstd port is built with its makefiles and installs a pkg-config file but no CMake package, so upstream’s quiet lookup fails and the library is built with no zstd support, unable to read zstd-compressed point clouds.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install pdal'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/gis/pdal.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/gis/pdal
echo '882b97aa3ae5db682c3b2dc8edef4e29bcc7ecea51c70592e71bc1f34112ad00 pdal-2.10.2.tar.bz2' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/pdal
SRC=$SRC_ROOT/pdal-2.10.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf pdal-2.10.2.tar.bz2 -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/10-zstd.patch"
cmake -S . -B build -G Ninja \
-D CMAKE_POLICY_VERSION_MINIMUM=3.5 \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D WITH_TESTS=OFF \
-D BUILD_DOCS=OFF \
-D ENABLE_CTEST=OFF \
-D WITH_ABSEIL=OFF \
-D WITH_BACKTRACE=OFF \
-D WITH_COMPLETION=OFF \
-D WITH_GCS=OFF \
-D WITH_ZLIB=ON \
-D WITH_ZSTD=ON \
-D WITH_LZMA=ON \
-D BUILD_TOOLS_LASDUMP=ON \
-D BUILD_TOOLS_NITFWRAP=OFF \
-D BUILD_PLUGIN_DRACO=ON \
-D BUILD_PLUGIN_HDF=ON \
-D BUILD_PLUGIN_ICEBRIDGE=ON \
-D BUILD_PLUGIN_E57=ON \
-D BUILD_PLUGIN_PGPOINTCLOUD=ON \
-D BUILD_PGPOINTCLOUD_TESTS=OFF \
-D BUILD_PLUGIN_TRAJECTORY=ON \
-D BUILD_PLUGIN_ARROW=OFF \
-D BUILD_PLUGIN_CPD=OFF \
-D BUILD_PLUGIN_FBX=OFF \
-D BUILD_PLUGIN_MATLAB=OFF \
-D BUILD_PLUGIN_MBIO=OFF \
-D BUILD_PLUGIN_NITF=OFF \
-D BUILD_PLUGIN_OPENSCENEGRAPH=OFF \
-D BUILD_PLUGIN_RDBLIB=OFF \
-D BUILD_PLUGIN_RIVLIB=OFF \
-D BUILD_PLUGIN_SPZ=OFF \
-D BUILD_PLUGIN_TEASER=OFF \
-D BUILD_PLUGIN_TILEDB=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
install -Dm644 scripts/bash-completion/pdal \
"$PKG/usr/share/bash-completion/completions/pdal"
The switches, and why each is set:
-D WITH_GCS=OFF— No reader or writer for Google Cloud Storage, a network store. Upstream’s default is on.-D WITH_ZLIB=ON,-D WITH_ZSTD=ON,-D WITH_LZMA=ON— Compression support, through zlib, zstd and xz. zstd is found through pkg-config because of10-zstd.patch.-D WITH_COMPLETION=OFF— Leave the bash completion tobuild.sh; off is upstream’s default. With it on, upstream installs the script only when/usr/share/bash-completion/completions(or else/etc/bash_completion.d) already exists on the build machine, so the result would depend on what was built first.build.shinstallsscripts/bash-completion/pdalinto/usr/share/bash-completion/completionsitself.-D WITH_BACKTRACE=OFF— Build without the stack trace PDAL prints on a crash, which links libunwind or libexecinfo when found. It is on by default upstream.-D WITH_ABSEIL=OFF— No Abseil, which upstream uses only as test debugging support.-D BUILD_TOOLS_LASDUMP=ON— Buildlasdump, which prints the header and points of a LAS file.-D BUILD_TOOLS_NITFWRAP=OFF— Nonitfwrap, which needs the NITF library.-D BUILD_PLUGIN_DRACO=ON— Read and write Google’s Draco compressed point clouds, through draco.-D BUILD_PLUGIN_HDF=ON,-D BUILD_PLUGIN_ICEBRIDGE=ON— Read HDF5 point data and NASA’s ICESat/IceBridge files, through hdf5.-D BUILD_PLUGIN_E57=ON— Read and write ASTM E57 scanner files; the libE57Format copy the plugin builds parses their XML section with xerces-c.-D BUILD_PLUGIN_PGPOINTCLOUD=ON— Read and write point clouds stored in PostgreSQL with the pgpointcloud extension, through postgresql’s client library.-D BUILD_PLUGIN_TRAJECTORY=ON— Compute a sensor trajectory from LAS input, with ceres-solver.-D BUILD_PLUGIN_ARROW=OFFto-D BUILD_PLUGIN_TILEDB=OFF— No Arrow, CPD, FBX, MATLAB, MBIO, NITF, OpenSceneGraph, rdblib, RiVLib, SPZ, TEASER++ or TileDB plugins. Each needs a library the tree does not carry. Every plugin is off by default upstream; the ones built are named on.-D WITH_TESTS=OFF,-D BUILD_PGPOINTCLOUD_TESTS=OFF,-D ENABLE_CTEST=OFF,-D BUILD_DOCS=OFF— Build no tests and no documentation targets.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/pdal, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf pdal-2.10.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/pdal, and runs the triggers its paths call for.
Contents
Installed programs: pdal, pdal-config.
Installed libraries: libE57Format.so, libpdal_plugin_filter_trajectory.so, libpdal_plugin_kernel_fauxplugin.so, libpdal_plugin_reader_draco.so, libpdal_plugin_reader_e57.so, libpdal_plugin_reader_hdf.so, libpdal_plugin_reader_icebridge.so, libpdal_plugin_reader_pgpointcloud.so, libpdal_plugin_writer_draco.so, libpdal_plugin_writer_e57.so, libpdal_plugin_writer_pgpointcloud.so, libpdalcpp.so.
Installed directories: /usr/include/E57Format, /usr/include/pdal, /usr/lib/cmake/E57Format, /usr/lib/cmake/PDAL, /usr/share/licenses/pdal.
Short descriptions
pdal.pc |
Point Data Abstraction Library |