Guest User

Untitled

a guest
Feb 24th, 2017
734
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer: Argyros Argyridis <arargyridis@gmail.com>
  2. # Contributor: Samuel Mesa <samuelmesa@linuxmail.org>
  3.  
  4. pkgname=orfeo-toolbox
  5. pkgver=5.10.0
  6. _pkgver=5.10
  7. minorver=1
  8. pkgrel=1
  9. pkgdesc="ORFEO Toolbox (OTB) is an open source library of image processing algorithms"
  10. arch=(x86_64 i686)
  11. url="http://www.orfeo-toolbox.org/otb/"
  12. license=('CeCILL')
  13. groups=()
  14. depends=('cmake' 'gdal' 'agg' 'freeglut' 'curl' 'fftw' 'tinyxml' 'muparser' 'fltk' 'python2' 'openthreads'
  15.         'hdf5'  'insight-toolkit' 'libkml' 'ossim' 'libsvm' 'mapnik', 'qwt5')
  16. makedepends=('boost' 'swig')
  17. optdepends=()
  18. provides=()
  19. conflicts=()
  20. replaces=()
  21. backup=()
  22. options=()
  23. install=
  24. changelog=
  25.  
  26. source=(https://www.orfeo-toolbox.org/packages/OTB-$pkgver.tar.gz
  27.         git://github.com/jmichel-otb/GKSVM.git)
  28. noextract=()
  29.  
  30. md5sums=('7004b52be82bb734beb435eeeece2397'
  31.          'SKIP')
  32.  
  33.  
  34. _gitname="GKSVM"
  35.  
  36. prepare() {
  37.     ## Module for monteverdi build
  38.     cd  $srcdir/  
  39.     cp -ra $srcdir/GKSVM $srcdir/OTB-release-$_pkgver/Modules/Remote
  40. }
  41.  
  42. build() {  
  43.   cd $srcdir/  
  44.   msg "Extracting archive..."
  45.   msg "starting make..."
  46.  
  47.   if  [ -d "$srcdir/build/" ]; then
  48.     rm -rf $srcdir/build/
  49.   fi
  50.   mkdir $srcdir/build/
  51.  
  52. cd $srcdir/build
  53.  
  54. cmake ../OTB-release-$_pkgver \
  55.     -DCMAKE_BUILD_TYPE=Release \
  56.     -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
  57.     -DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
  58.     -DCMAKE_INSTALL_PREFIX=/usr \
  59.     -DOTB_USE_CURL=ON \
  60.     -DBUILD_EXAMPLES=OFF \
  61.     -DBUILD_TESTING=OFF \
  62.     -DOTB_WRAP_PYTHON=ON \
  63.     -DPYTHON_EXECUTABLE=/usr/bin/python2 \
  64.     -DPYTHON_LIBRARIES=/usr/lib/libpython2.7.so \
  65.     -DPYTHON_INCLUDE_PATH=/usr/include/python2.7/ \
  66.     -DOTB_INSTALL_PYTHON_DIR=/usr/lib/python2.7/site-packages/ \
  67.     -DITK_DIR=/usr/lib64/cmake/ITK-4.10 \
  68.     -DBUILD_SHARED_LIBS=ON \
  69.     -DOTB_USE_QT4=ON \
  70.     -DOTB_USE_MAPNIK=OFF \
  71.     -DOTB_USE_OPENCV=OFF \
  72.     -DOTB_USE_MUPARSER=ON \
  73.     -DOTB_USE_LIBKML=ON \
  74.     -DOTB_USE_LIBSVM=ON \
  75.     -DOTB_USE_OPENGL=ON \
  76.     -DOTB_USE_GLUT=ON \
  77.     -DOTB_USE_GLEW=ON \
  78.     -DOTB_USE_QWT=ON \
  79.     -DQWT_INCLUDE_DIR=/usr/include/qwt5 \
  80.     -DQWT_LIBRARY=/usr/lib64/libqwt5.so \
  81.     -DOTB_DATA_USE_LARGEINPUT=ON \
  82.     -DOTB_BUILD_ALL_MODULES_FOR_TESTS=ON
  83.  
  84. make
  85.  
  86.  
  87. }
  88.  
  89. package() {
  90.   # Install an ldconfig conf for Orfeo libs to be visible on the
  91.   # system. Arch runs `ldconfig' after install automatically:
  92.   echo "/usr/lib/otb  /usr/lib/otb/applications" > "${srcdir}/${pkgname}.conf"
  93.   install -D -m644 "${srcdir}/${pkgname}.conf" "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf"
  94.  
  95.   cd "$srcdir/"build
  96.   make DESTDIR="$pkgdir" install
  97. }
RAW Paste Data