summaryrefslogtreecommitdiffstats
path: root/gis/pdal/pdal.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/pdal/pdal.SlackBuild')
-rw-r--r--gis/pdal/pdal.SlackBuild63
1 files changed, 56 insertions, 7 deletions
diff --git a/gis/pdal/pdal.SlackBuild b/gis/pdal/pdal.SlackBuild
index 7fab3eac74..dfb181ed11 100644
--- a/gis/pdal/pdal.SlackBuild
+++ b/gis/pdal/pdal.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for pdal
-# Copyright 2013-2020 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
+# Copyright 2013-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +23,40 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=pdal
SRCNAM=PDAL
-VERSION=${VERSION:-2.1.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
@@ -36,7 +66,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -81,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 \
@@ -101,4 +150,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE