summaryrefslogtreecommitdiffstats
path: root/gis/qgis/qgis.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/qgis/qgis.SlackBuild')
-rw-r--r--gis/qgis/qgis.SlackBuild36
1 files changed, 28 insertions, 8 deletions
diff --git a/gis/qgis/qgis.SlackBuild b/gis/qgis/qgis.SlackBuild
index af1e4f06fc..249dad3bc6 100644
--- a/gis/qgis/qgis.SlackBuild
+++ b/gis/qgis/qgis.SlackBuild
@@ -4,6 +4,7 @@
# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
# Copyright 2013-2021 Benjamin Trigona-Harany
+# Copyright 2023-2024 Giancarlo Dessi, Cagliari, IT
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=qgis
-VERSION=${VERSION:-3.20.0}
+VERSION=${VERSION:-3.36.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,9 +40,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
@@ -80,8 +78,26 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if pkg-config --exists OpenCL; then
+ OCL="-DUSE_OPENCL=OFF " ; [ "${OPENCL:-yes}" = "yes" ] && OCL="-DUSE_OPENCL=ON "
+else
+ OCL="-DUSE_OPENCL=OFF "
+fi
+
+if pkg-config --exists pdal; then
+ WITHPDAL="-DWITH_PDAL=OFF "; [ "${PDAL:-yes}" = "yes" ] && WITHPDAL="-DWITH_PDAL=ON "
+else
+ WITHPDAL="-DWITH_PDAL=OFF "
+fi
+
+if pkg-config --exists draco; then
+ WITHDRACO="-DWITH_DRACO=OFF "; [ "${DRACO:-yes}" = "yes" ] && WITHDRACO="-DWITH_DRACO=ON "
+else
+ WITHDRACO="-DWITH_DRACO=OFF "
+fi
+
if pkg-config --exists grass; then
- WITHGRASS="-DGRASS_PREFIX=$(pkg-config --variable=prefix grass)"
+ WITHGRASS="-DGRASS_PREFIX=$(pkg-config --variable=prefix grass) "
else
WITHGRASS=""
fi
@@ -92,7 +108,7 @@ mkdir -p build
cd build
cmake .. \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -pthread" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DQGIS_LIB_SUBDIR=lib${LIBDIRSUFFIX} \
@@ -106,9 +122,12 @@ cd build
-DENABLE_TESTS=FALSE \
-DWITH_3D=TRUE \
-Wno-dev \
+ $OCL \
+ $WITHPDAL \
+ $WITHDRACO \
$WITHGRASS
- make || make -j1
+ make
make install DESTDIR=$PKG
cd -
@@ -123,8 +142,9 @@ cp debian/qgis.xml $PKG/usr/share/mime/packages
mkdir -p $PKG/usr/doc
mv $PKG/usr/share/$PRGNAM/doc $PKG/usr/doc/$PRGNAM-$VERSION
+rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL.md
cp -a \
- ChangeLog Exception_to_GPL_for_Qt.txt NEWS.md \
+ COPYING ChangeLog Exception_to_GPL_for_Qt.txt NEWS.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild