Skip to content

Instantly share code, notes, and snippets.

@samtux
Last active November 1, 2019 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samtux/5b9bbf99954bd38eec851441beb068a3 to your computer and use it in GitHub Desktop.
Save samtux/5b9bbf99954bd38eec851441beb068a3 to your computer and use it in GitHub Desktop.
PKGBUILD Orfeo Toolbox 7.0.0
# Maintainer: Argyros Argyridis <arargyridis@gmail.com>
# Contributor: Samuel Mesa <samuelmesa@linuxmail.org>
pkgname=orfeo-toolbox
pkgver=7.0.0
minorver=1
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/otb/"
license=('CeCILL')
groups=()
depends=('cmake' 'gdal' 'agg' 'freeglut' 'curl' 'fftw' 'tinyxml' 'muparser' 'fltk' 'python' 'openthreads'
'hdf5' 'itk4' 'ossim' 'libsvm' 'mapnik' 'libsvm' 'qwt' 'opencv' 'ocl-icd')
makedepends=('boost' 'swig' 'qt5-base')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(https://www.orfeo-toolbox.org/packages/OTB-$pkgver.tar.gz
git://github.com/jmichel-otb/GKSVM.git)
noextract=()
md5sums=('314b985d112dab6d407dd6d35bccc790'
'SKIP')
_gitname="GKSVM"
prepare() {
## Module for monteverdi build
cp -ra $srcdir/GKSVM $srcdir/Modules/Remote
[[ -d build ]] || mkdir build
}
build() {
cd build
cmake ../ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOTB_USE_CURL=ON \
-DOTB_USE_GLEW=ON \
-DOTB_USE_GLFW=ON \
-DOTB_USE_GLUT=ON \
-DOTB_USE_GSL=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DOTB_WRAP_PYTHON=ON \
-DBUILD_SHARED_LIBS=ON \
-DOTB_USE_QT=ON \
-DOTB_USE_QWT=ON \
-DOTB_USE_OPENCV=ON \
-DOTB_USE_OPENGL=ON \
-DOTB_USE_MUPARSER=ON \
-DOTB_USE_LIBKML=OFF \
-DOTB_USE_LIBSVM=ON \
-DOTB_DATA_USE_LARGEINPUT=ON \
-DOTB_USE_OPENMP=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 build
make DESTDIR="$pkgdir" install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment