diff options
Diffstat (limited to 'gis/pdal/pdal.SlackBuild')
-rw-r--r-- | gis/pdal/pdal.SlackBuild | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/gis/pdal/pdal.SlackBuild b/gis/pdal/pdal.SlackBuild index 39a8caf2c3..dfb181ed11 100644 --- a/gis/pdal/pdal.SlackBuild +++ b/gis/pdal/pdal.SlackBuild @@ -2,6 +2,7 @@ # Slackware build script for pdal +# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT # Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> # All rights reserved. # @@ -26,11 +27,37 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pdal SRCNAM=PDAL -VERSION=${VERSION:-2.2.0} +VERSION=${VERSION:-2.7.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} +# ************************************************************************* + +# Build of these plugin is enabled by default since they require netcdf and hdf5 +BUILDICEBRIDGE="-DBUILD_PLUGIN_ICEBRIDGE=ON" ; \ + [ "${ICEBRIDGE:-yes}" = "no" ] && BUILDICEBRIDGE="" +BUILDHDF="-DBUILD_PLUGIN_HDF=ON" ; \ + [ "${HDF:-yes}" = "no" ] && BUILDHDF="" + +# Build of these is enabled by default if their additional optional deps are installed +if [ "${OSG:-yes}" = "yes" ]; then + BUILDOSG="" ; [ -x /usr/bin/osgversion ] && BUILDOSG="-DBUILD_PLUGIN_OPENSCENEGRAPH=ON" +fi +if [ "${E57:-yes}" = "yes" ]; then + BUILDE57="" ; [ -d /usr/include/xercesc ] && BUILDE57="-DBUILD_PLUGIN_E57=ON" +fi +if [ "${DRACO:-yes}" = "yes" ]; then + BUILDDRACO="" ; [ -x /usr/bin/draco_decoder-1.5.* ] && BUILDDRACO="-DBUILD_PLUGIN_DRACO=ON" +fi + +# ************************************************************************* + +# Users that have a standard installation of proprietary MatLAB would enable +# the build of Matlab plugin. This is disabled by default +BUILDMATLAB="" ; [ "${MATLAB:-no}" = "yes" ] && \ + BUILDMATLAB="-DBUILD_PLUGIN_MATLAB=ON" + if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; @@ -39,9 +66,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -91,15 +115,30 @@ cd build -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ -DBUILD_PGPOINTCLOUD_TESTS=OFF \ -DBUILD_PLUGIN_PGPOINTCLOUD=ON \ - -DBUILD_PLUGIN_SQLITE=ON \ - -DBUILD_PLUGIN_DELAUNAY=ON \ -DWITH_COMPLETION=ON \ + -DWITH_BACKTRACE=OFF \ + -DWITH_TESTS=FALSE \ + $BUILDICEBRIDGE \ + $BUILDE57 \ + $BUILDDRACO \ + $BUILDOSG \ + $BUILDHDF \ + $BUILDMATLAB \ .. + make make install DESTDIR=$PKG cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +# Remove empty directories and fix permissions (issues found by sbopkglint) +rmdir $PKG/usr/include/pdal/filters/private/csf +rmdir $PKG/usr/include/pdal/filters/private/miniball +chmod 644 $PKG/usr/include/pdal/*.hpp +chmod 644 $PKG/usr/include/pdal/*/*.hpp +chmod 644 $PKG/usr/include/pdal/*/*/*.hpp +chmod 644 $PKG/usr/include/pdal/*/*/*/*.hpp mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ |