Created
April 1, 2024 09:39
-
-
Save ArArgyridis/5bb13fcdaeb10eb2951bde245c69734f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Argyros Argyridis <arargyridis@gmail.com> | |
# Contributor: Samuel Mesa <samuelmesa@linuxmail.org> | |
pkgname=orfeo-toolbox | |
pkgver=9.0.0 | |
_pkgver=9.0 | |
pkgrel=1 | |
pkgdesc="ORFEO Toolbox (OTB) is an open source library of image processing algorithms" | |
arch=(x86_64 i686) | |
url="http://www.orfeo-toolbox.org" | |
license=('CeCILL') | |
groups=() | |
depends=('gdal' 'cblas' 'freeglut' 'curl' 'fftw' 'tinyxml' 'muparser' 'muparserx' 'python' 'boost' 'lapack' 'hdf5' 'insight-toolkit4' 'libsvm' 'opencv>=3' 'openmpi') | |
makedepends=('git' 'swig' 'cmake' 'qt5-base') | |
optdepends=() | |
provides=() | |
conflicts=() | |
replaces=() | |
backup=() | |
options=() | |
install= | |
changelog= | |
source=("${pkgname}-${pkgver}.tar.gz::https://www.orfeo-toolbox.org/packages/OTB-$pkgver.tar.gz" | |
"git+https://github.com/jmichel-otb/GKSVM.git") | |
noextract=() | |
md5sums=('96514ae349ded4498d1e105694f7af5a' | |
'SKIP') | |
_gitname="GKSVM" | |
prepare() { | |
## Module for monteverdi build | |
echo $srcdir | |
cd $srcdir/ | |
cp -ra $srcdir/GKSVM $srcdir/Modules/Remote | |
#commenting version detection for FindMUParser.cmake since it causes an error | |
sed -i '62 s/^/#/' $srcdir/CMake/FindMuParser.cmake | |
sed -i '63 s/^/#/' $srcdir/CMake/FindMuParser.cmake | |
} | |
build() { | |
cd $srcdir/ | |
if [ -d "$srcdir/build/" ]; then | |
rm -rf $srcdir/build/ | |
fi | |
mkdir $srcdir/build/ | |
cd $srcdir/build | |
cmake ../ \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DBUILD_EXAMPLES=OFF \ | |
-DBUILD_TESTING=OFF \ | |
-DOTB_USE_CURL=ON \ | |
-DOTB_WRAP_PYTHON=ON \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DOTBGroup_FeaturesExtraction=ON \ | |
-DOTBGroup_Hyperspectral=ON \ | |
-DOTBGroup_Learning=ON \ | |
-DOTBGroup_Miscellaneous=ON \ | |
-DOTBGroup_Remote=ON \ | |
-DOTBGroup_SAR=ON \ | |
-DOTBGroup_Segmentation=ON \ | |
-DOTBGroup_StereoProcessing=ON \ | |
-DOTB_USE_OPENCV=ON \ | |
-DOTB_USE_MUPARSER=ON \ | |
-DOTB_USE_MUPARSERX=OFF \ | |
-DOTB_USE_LIBKML=ON \ | |
-DOTB_USE_LIBSVM=ON \ | |
-DOTB_USE_OPENMP=ON \ | |
-DOTB_USE_6S=ON \ | |
-DOTB_DATA_USE_LARGEINPUT=ON \ | |
-DOTB_USE_SPTW=ON \ | |
-DOTB_USE_SPTW=ON \ | |
-DOTB_USE_SHARK=ON \ | |
-DITK_DIR=/opt/insight-toolkit4 \ | |
-DCMAKE_PREFIX_PATH=/opt/insight-toolkit4 \ | |
-DCMAKE_CXX_STANDARD=17 \ | |
-DBoost_USE_STATIC_LIBS=ON | |
make | |
} | |
package() { | |
# Install an ldconfig conf for Orfeo libs to be visible on the | |
# system. Arch runs `ldconfig' after install automatically: | |
echo "/usr/lib/otb | |
/usr/lib/otb/applications" > "${srcdir}/${pkgname}.conf" | |
install -D -m644 "${srcdir}/${pkgname}.conf" "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf" | |
cd "$srcdir/"build | |
make DESTDIR="$pkgdir" install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment