blob: e9fa7eb3e03122bc6fc21e2fa1cc7366380d95fc (
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
|
# Maintainer (AUR): Christian Pfeiffer <xpipe at hotmail dot de>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=shogun
pkgver=6.1.3
pkgrel=1
pkgdesc="A Large Scale Machine Learning Toolbox"
arch=('i686' 'x86_64')
url="http://shogun.ml/"
license=('GPL3')
depends=('arpack' 'cblas' 'glpk' 'hdf5' 'lapacke' 'libxml2'
'json-c' 'lua' 'openblas' 'ocl-icd' 'python' 'r' 'snappy')
makedepends=('cmake' 'ctags' 'doxygen' 'eigen3' 'gdb' 'opencv' 'pandoc' 'protobuf'
'python-numpy' 'python-ply' 'python-sphinx' 'swig' 'rxcpp')
optdepends=('opencv: OpenCV support'
'python-numpy: Python bindings'
'python-ply: Python bindings')
source=($pkgname-$pkgver.tar.gz::https://github.com/shogun-toolbox/shogun/archive/shogun_$pkgver.tar.gz
$pkgname-gpl-$pkgver.tar.gz::https://github.com/shogun-toolbox/shogun-gpl/archive/v$pkgver.tar.gz
0001-Removed-is_error-macro-dependency-4098.patch)
sha256sums=('75f4d555efe06eaa7c4c12a1dc942f6e4d41a8ed495777a790b9bd9df936c19c'
'e8e2fea9804d3e0924a318b00a764bbf9d751c29d32adeeffbb83aec9fbca966'
'571172d9f31554c1e41cf1e3467cec38c527f1ccf9a2866bf49acfa0c1a84ac4')
prepare() {
mkdir build
mv -T "${pkgname}-gpl-${pkgver}" "${srcdir}/${pkgname}-${pkgname}_${pkgver}/src/gpl"
cd "${srcdir}/${pkgname}-${pkgname}_${pkgver}"
patch -p1 -i ../0001-Removed-is_error-macro-dependency-4098.patch
}
build() {
cd build
cmake_args=()
if [ "${CARCH}" != "x86_64" ]; then
cmake_args+=("-DDISABLE_SSE=ON")
fi
cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ARPREC=OFF \
-DBUILD_EXAMPLES=OFF -DBUILD_META_EXAMPLES=OFF \
-DENABLE_ARPACK=ON -DENABLE_BZIP2=ON \
-DENABLE_COLPACK=OFF -DENABLE_VIENNACL=OFF \
-DENABLE_EIGEN_LAPACK=ON \
-DENABLE_CPLEX=OFF -DENABLE_MOSEK=OFF \
-DENABLE_NLOPT=OFF -DENABLE_GLPK=ON -DENABLE_LPSOLVE=ON \
-DENABLE_CURL=ON -DENABLE_HDF5=ON -DENABLE_JSON=ON \
-DENABLE_LDGOLD=ON -DENABLE_LTO=ON \
-DENABLE_PROTOBUF=ON -DENABLE_LIBXML2=ON \
-DENABLE_BZIP2=ON -DENABLE_LIBLZMA=ON -DENABLE_LZO=ON \
-DENABLE_SNAPPY=ON -DENABLE_ZLIB=ON \
-DLICENSE_GPL_SHOGUN=ON \
-DOpenCV=ON \
-DUSE_CPLEX=OFF -DUSE_MOSEK=OFF \
-DUSE_GLPK=ON -DUSE_LPSOLVE=ON -DUSE_BZIP2=ON \
-DUSE_GZIP=ON -DUSE_LZMA=ON -DUSE_LZO=ON -DUSE_SNAPPY=ON \
-DUSE_SVMLIGHT=ON -DUSE_SWIG_DIRECTORS=ON \
-DINTERFACE_LUA=ON \
-DINTERFACE_PYTHON=ON -DINTERFACE_R=ON \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON \
-DBUILD_SHARED_LIBS=ON \
-DLAPACK_lapack_LIBRARY="/usr/lib/liblapack.so\;/usr/lib/liblapacke.so\;/usr/lib/libcblas.so" \
"${cmake_args[@]}" \
"${srcdir}/${pkgname}-${pkgname}_${pkgver}"
make
}
package() {
cd build
make DESTDIR="${pkgdir}" install
# The minimal example is always being installed
rm -r "${pkgdir}/usr/share/shogun/examples"
# Shogun will install some empty directories
find "${pkgdir}" -type d -empty -delete
}
|