diff options
-rw-r--r-- | gis/OTB/OTB.SlackBuild | 39 | ||||
-rw-r--r-- | gis/OTB/OTB.info | 10 | ||||
-rw-r--r-- | gis/OTB/README | 26 |
3 files changed, 44 insertions, 31 deletions
diff --git a/gis/OTB/OTB.SlackBuild b/gis/OTB/OTB.SlackBuild index 00e00ccb978f..714540970c5e 100644 --- a/gis/OTB/OTB.SlackBuild +++ b/gis/OTB/OTB.SlackBuild @@ -2,6 +2,7 @@ # SlackBuild script for OTB +# Copyright 2023 Giancarlo Dessi, Cagliari, IT # Copyright 2014-2021 Benjamin Trigona-Harany <slackbuilds@jaxartes.net> # All rights reserved. # @@ -27,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=OTB -VERSION=${VERSION:-7.3.0} +VERSION=${VERSION:-8.1.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,9 +41,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 @@ -68,6 +66,20 @@ fi set -e +# Search for optional dependencies +if pkg-config --exists ompi; then + BUILD_MPI="" ; [ "${MPI:-ON}" = "ON" ] && BUILD_MPI="-DOTB_USE_MPI=ON " +else + BUILD_MPI="" +fi + +# glfw3 will be enabled only if environment variable MONTEVERDI is set to ON +if pkg-config --exists glfw3; then + WITH_GLFW="" ; [ "${GLFW:-ON}" = "ON" ] && WITH_GLFW="-DOTB_USE_GLFW=ON " +else + WITH_GLFW="" +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -86,18 +98,12 @@ sed -i "s/lib\b/lib${LIBDIRSUFFIX}/" \ CMake/OTBModuleExternal.cmake \ CMake/OTBStandaloneModuleMacros.cmake \ CMake/OTBApplicationMacros.cmake -sed -i '1i\using namespace std;' \ - Modules/ThirdParty/OssimPlugins/src/gdal/*.cpp \ - Modules/ThirdParty/OssimPlugins/src/ossim/*.{h,cpp} \ - Modules/ThirdParty/OssimPlugins/src/ossim/otb/*.cpp \ - Modules/Adapters/OSSIMAdapters/src/*.cxx -sed -i "s/[{]0.0[}]//" \ - Modules/{Learning,Segmentation,Filtering,Registration}/*/include/*.h \ - Modules/Core/Common/include/otbImageRegionAdaptativeSplitter.h \ - Modules/Core/Transform/include/otbImageToGenericRSOutputParameters.h MONTEVERDI=${MONTEVERDI:-OFF} -BUILD_MONTEVERDI="-DOTB_USE_QWT=$MONTEVERDI -DOTB_USE_GLEW=$MONTEVERDI -DOTB_USE_OPENGL=$MONTEVERDI" +BUILD_MONTEVERDI="-DOTB_USE_QWT=$MONTEVERDI \ + -DOTB_USE_GLEW=$MONTEVERDI \ + -DOTB_USE_OPENGL=$MONTEVERDI \ + $WITH_GLFW" BUILD_QT="-DOTB_USE_QT=${QTGUI:-ON}" mkdir -p build @@ -120,11 +126,12 @@ cd build -DOTB_INSTALL_PYTHON_DIR=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ -DOTB_WRAP_PYTHON=ON \ -DOTB_INSTALL_DOC_DIR=doc/$PRGNAM-$VERSION \ - -DGDAL_CONFIG_CHECKING=OFF \ + -DGDAL_CONFIG_CHECKING=ON \ + $BUILD_MPI \ $BUILD_MONTEVERDI \ $BUILD_QT \ .. - + make make install DESTDIR=$PKG cd .. diff --git a/gis/OTB/OTB.info b/gis/OTB/OTB.info index 5fa635b0e0ec..6e3b37608a30 100644 --- a/gis/OTB/OTB.info +++ b/gis/OTB/OTB.info @@ -1,10 +1,10 @@ PRGNAM="OTB" -VERSION="7.3.0" +VERSION="8.1.2" HOMEPAGE="http://orfeo-toolbox.org/otb/" -DOWNLOAD="https://github.com/orfeotoolbox/OTB/archive/7.3.0/OTB-7.3.0.tar.gz" -MD5SUM="8de334b5390c2a529f28fd6de2d54535" +DOWNLOAD="https://github.com/orfeotoolbox/OTB/archive/8.1.2/OTB-8.1.2.tar.gz" +MD5SUM="b9657e08b5a985e46a8442bcdcfd8038" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="gdal ITK libkml OpenSceneGraph muParser ossim Shark tinyxml" -MAINTAINER="Benjamin Trigona-Harany" -EMAIL="slackbuilds@jaxartes.net" +MAINTAINER="Giancarlo Dessi" +EMAIL="slack@giand.it" diff --git a/gis/OTB/README b/gis/OTB/README index 092b979a81f7..637002a2a79b 100644 --- a/gis/OTB/README +++ b/gis/OTB/README @@ -1,18 +1,24 @@ ORFEO Toolbox (OTB) is an open source library of image processing -algorithms. OTB is based on the medical image processing library -ITK and offers particular functionalities for remote sensing image -processing in general and for high spatial resolution images in -particular. Targeted algorithms for high resolution optical images -(Pleiades, SPOT, QuickBird, WorldView, Landsat, Ikonos), hyperspectral -sensors (Hyperion) or SAR (TerraSarX, ERS, Palsar) are available. +algorithms. +OTB is based on the medical image processing library ITK and offers +particular functionalities for remote sensing image processing in +general and for high spatial resolution images in particular. Targeted +algorithms for high resolution optical images (Pleiades, SPOT, +QuickBird, WorldView, Landsat, +Ikonos), hyperspectral sensors (Hyperion) or SAR (TerraSarX, ERS, +Palsar) are available. Monteverdi, a satellite image viewer with access to OTB processing, will also be built if MONTEVERDI=ON is passed to the script. This will require the qwt package to be installed. -A QT application launcher will be built by default. Set QTGUI=OFF -to disable it (note that disabling Qt support will also disable -Monteverdi even if MONTEVERDI is set to ON). +A QT application launcher will be built by default. Set QTGUI=OFF to +disable it (note that disabling Qt support will also disable Monteverdi +even if MONTEVERDI is set to ON). OTB will be built with support for the following packages if they are -available at compile time: numpy3. +available at compile time: numpy3, openmpi, glfw3. Support to glfw3 is +enabled only with the build of Monteverdi. + +Warning: the build fails if Shark is not built against the optional +dependency cblas that gives the support to ATLAS. |