summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8fb8d6a43ff8bdc271c0938ec910d4139047f89d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Argyros Argyridis <arargyridis@gmail.com>
# Contributor: Samuel Mesa <samuelmesa@linuxmail.org>

pkgname=orfeo-toolbox
pkgver=5.4
minorver=0
pkgrel=2
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' 'python2' 'openthreads' 
		'hdf5'  'insight-toolkit' 'libkml' 'ossim' 'libsvm' 'mapnik')
makedepends=('boost' 'swig')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=

source=(https://www.orfeo-toolbox.org/packages/OTB-$pkgver.$minorver.tgz
		git://github.com/jmichel-otb/GKSVM.git)
noextract=()

md5sums=('7abceaebd6c8e0116b0170535e4e4236'
         'SKIP')


_gitname="GKSVM"

prepare() {
	## Module for monteverdi build
	cd 	$srcdir/  
	cp -ra $srcdir/GKSVM $srcdir/OTB-$pkgver.$minorver/Modules/Remote
}

build() {  
  cd $srcdir/  
  msg "Extracting archive..." 
  msg "starting make..."
  
  #if  [ -d "$srcdir/build/" ]; then
  #  rm -rf $srcdir/build/
  #fi
  #mkdir $srcdir/build/

cd $srcdir/build

cmake ../OTB-$pkgver.$minorver \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOTB_USE_CURL=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DOTB_WRAP_PYTHON=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
-DPYTHON_LIBRARIES=/usr/lib/libpython2.7.so \
-DPYTHON_INCLUDE_PATH=/usr/include/python2.7/ \
-DOTB_INSTALL_PYTHON_DIR=/usr/lib/python2.7/site-packages/ \
-DITK_DIR=/usr/lib64/cmake/ITK-4.9 \
-DBUILD_SHARED_LIBS=ON \
-DOTB_USE_QT4=ON \
-DOTB_USE_MAPNIK=OFF \
-DOTB_USE_OPENCV=OFF \
-DOTB_USE_MUPARSER=ON \
-DOTB_USE_LIBKML=ON \
-DOTB_USE_LIBSVM=ON \
-DOTB_USE_OPENGL=ON \
-DOTB_USE_GLUT=ON \
-DOTB_DATA_USE_LARGEINPUT=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
}