summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Pfeiffer2018-12-14 17:23:55 +0100
committerChristian Pfeiffer2018-12-14 17:23:55 +0100
commit0bcabe6ffea480b977a3e32816dc88fc339fded0 (patch)
treed258081333bc5d9c38e407d2dd14f3e1b8ae94c9
parent65f3d32fd7f5a4adf5ed06d5d37e9a7559e8702f (diff)
downloadaur-0bcabe6ffea480b977a3e32816dc88fc339fded0.tar.gz
Update to 6.1.3
-rw-r--r--.SRCINFO55
-rw-r--r--0001-Removed-is_error-macro-dependency-4098.patch169
-rw-r--r--PKGBUILD89
3 files changed, 283 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 187c3823789a..a850849dd7a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,47 @@
-# Generated by mksrcinfo v8
-# Tue Dec 8 12:31:47 UTC 2015
pkgbase = shogun
- pkgdesc = Shogun - A Large Scale Machine Learning Toolbox with the python interface
- pkgver = 4.0.0
- pkgrel = 2
- url = http://www.shogun-toolbox.org
- arch = i686
+ pkgdesc = A Large Scale Machine Learning Toolbox
+ pkgver = 6.1.3
+ pkgrel = 1
+ url = http://shogun.ml/
arch = x86_64
- license = GPLv3
+ license = GPL3
+ makedepends = ctags
+ makedepends = doxygen
+ makedepends = eigen3
+ makedepends = gdb
+ makedepends = opencv
+ makedepends = pandoc
+ makedepends = protobuf
+ makedepends = python-numpy
+ makedepends = python-ply
+ makedepends = python-sphinx
+ makedepends = swig
+ makedepends = rxcpp-git
+ makedepends = viennacl
+ depends = arpack
+ depends = arprec
depends = cblas
- depends = lapack
- depends = swig-git
- depends = python-numpy
- depends = libcl
- source = http://shogun-toolbox.org/archives/shogun/releases/4.0/sources/shogun-4.0.0.tar.bz2
- md5sums = 57370e869f3b24f74ce9c7b8741000b0
+ depends = glpk
+ depends = hdf5
+ depends = lapacke
+ depends = libxml2
+ depends = json-c
+ depends = lua
+ depends = nlopt
+ depends = openblas
+ depends = ocl-icd
+ depends = python
+ depends = r
+ depends = snappy
+ optdepends = opencv: OpenCV support
+ optdepends = python-numpy: Python bindings
+ optdepends = python-ply: Python bindings
+ source = https://github.com/shogun-toolbox/shogun/archive/shogun_6.1.3.tar.gz
+ source = https://github.com/shogun-toolbox/shogun-gpl/archive/v6.1.3.tar.gz
+ source = 0001-Removed-is_error-macro-dependency-4098.patch
+ sha256sums = 75f4d555efe06eaa7c4c12a1dc942f6e4d41a8ed495777a790b9bd9df936c19c
+ sha256sums = e8e2fea9804d3e0924a318b00a764bbf9d751c29d32adeeffbb83aec9fbca966
+ sha256sums = 571172d9f31554c1e41cf1e3467cec38c527f1ccf9a2866bf49acfa0c1a84ac4
pkgname = shogun
diff --git a/0001-Removed-is_error-macro-dependency-4098.patch b/0001-Removed-is_error-macro-dependency-4098.patch
new file mode 100644
index 000000000000..89a7f9ffb448
--- /dev/null
+++ b/0001-Removed-is_error-macro-dependency-4098.patch
@@ -0,0 +1,169 @@
+From 365ce4c4c700736d2eec8ba6c975327a5ac2cd9b Mon Sep 17 00:00:00 2001
+From: Andrew Wildman <apw4@uw.edu>
+Date: Mon, 22 Jan 2018 22:56:29 -0800
+Subject: [PATCH] Removed is_error macro dependency (#4098)
+
+---
+ src/shogun/io/NeuralNetworkFileReader.cpp | 4 ++--
+ src/shogun/io/SerializableJsonFile.cpp | 27 +++++++++++-----------
+ src/shogun/io/SerializableJsonReader00.cpp | 6 +++--
+ 3 files changed, 19 insertions(+), 18 deletions(-)
+
+diff --git a/src/shogun/io/NeuralNetworkFileReader.cpp b/src/shogun/io/NeuralNetworkFileReader.cpp
+index be90fddf3..d4d5f5d4a 100644
+--- a/src/shogun/io/NeuralNetworkFileReader.cpp
++++ b/src/shogun/io/NeuralNetworkFileReader.cpp
+@@ -51,7 +51,7 @@ CNeuralNetwork* CNeuralNetworkFileReader::read_file(const char* file_path)
+ {
+ json_object* json_network = json_object_from_file(file_path);
+
+- if (is_error(json_network))
++ if (json_network == nullptr)
+ {
+ SG_ERROR("Error while opening file: %s!\n", file_path);
+ return NULL;
+@@ -68,7 +68,7 @@ CNeuralNetwork* CNeuralNetworkFileReader::read_string(const char* str)
+ {
+ json_object* json_network = json_tokener_parse(str);
+
+- if (is_error(json_network))
++ if (json_network == nullptr)
+ {
+ SG_ERROR("Error while parsing the given string\n");
+ return NULL;
+diff --git a/src/shogun/io/SerializableJsonFile.cpp b/src/shogun/io/SerializableJsonFile.cpp
+index 901c4bf44..af00971c0 100644
+--- a/src/shogun/io/SerializableJsonFile.cpp
++++ b/src/shogun/io/SerializableJsonFile.cpp
+@@ -42,7 +42,6 @@ CSerializableJsonFile::new_reader(char* dest_version, size_t n)
+ m_stack_stream.back(), STR_KEY_FILETYPE, &buf);
+
+ if (!success || buf == NULL
+- || is_error(buf)
+ || (ftype = json_object_get_string(buf)) == NULL)
+ return NULL;
+
+@@ -77,11 +76,10 @@ bool
+ CSerializableJsonFile::get_object(json_object** dest, json_object* src,
+ const char* key, json_type t)
+ {
+- bool success = true ;
+- success = json_object_object_get_ex(src, key, & *dest);
++ bool success = true;
++ success = json_object_object_get_ex(src, key, &*dest);
+
+- return success && *dest != NULL && !is_error(*dest)
+- && json_object_is_type(*dest, t);
++ return success && *dest != nullptr && json_object_is_type(*dest, t);
+ }
+
+ void
+@@ -97,7 +95,8 @@ CSerializableJsonFile::init(const char* fname)
+ switch (m_task) {
+ case 'r':
+ buf = json_object_from_file((char*) fname);
+- if (is_error(buf)) {
++ if (buf == nullptr)
++ {
+ SG_ERROR("Could not open file `%s' for reading!\n",
+ fname);
+ return;
+@@ -219,7 +218,7 @@ CSerializableJsonFile::write_scalar_wrapped(
+ break;
+ }
+
+- if (is_error(m_stack_stream.back()))
++ if (m_stack_stream.back() == nullptr)
+ return false;
+
+ return true;
+@@ -289,7 +288,7 @@ CSerializableJsonFile::write_sparse_begin_wrapped(
+ push_object(json_object_new_object());
+
+ json_object* buf = json_object_new_array();
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(),
+@@ -319,7 +318,7 @@ CSerializableJsonFile::write_sparseentry_begin_wrapped(
+ push_object(buf);
+
+ buf = json_object_new_int(feat_index);
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(),
+@@ -380,7 +379,7 @@ CSerializableJsonFile::write_sgserializable_begin_wrapped(
+
+ json_object* buf;
+ buf = json_object_new_string(sgserializable_name);
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(),
+@@ -390,7 +389,7 @@ CSerializableJsonFile::write_sgserializable_begin_wrapped(
+ string_t buf_str;
+ TSGDataType::ptype_to_string(buf_str, generic, STRING_LEN);
+ buf = json_object_new_string(buf_str);
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(),
+@@ -398,7 +397,7 @@ CSerializableJsonFile::write_sgserializable_begin_wrapped(
+ }
+
+ buf = json_object_new_object();
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+ json_object_object_add(m_stack_stream.back(), STR_KEY_INSTANCE,
+ buf);
+@@ -423,7 +422,7 @@ CSerializableJsonFile::write_type_begin_wrapped(
+ const TSGDataType* type, const char* name, const char* prefix)
+ {
+ json_object* buf = json_object_new_object();
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(), name, buf);
+@@ -432,7 +431,7 @@ CSerializableJsonFile::write_type_begin_wrapped(
+ string_t str_buf;
+ type->to_string(str_buf, STRING_LEN);
+ buf = json_object_new_string(str_buf);
+- if (is_error(buf))
++ if (buf == nullptr)
+ return false;
+
+ json_object_object_add(m_stack_stream.back(), STR_KEY_TYPE, buf);
+diff --git a/src/shogun/io/SerializableJsonReader00.cpp b/src/shogun/io/SerializableJsonReader00.cpp
+index 06a602b6e..a885c787e 100644
+--- a/src/shogun/io/SerializableJsonReader00.cpp
++++ b/src/shogun/io/SerializableJsonReader00.cpp
+@@ -151,7 +151,8 @@ SerializableJsonReader00::read_stringentry_begin_wrapped(
+ json_object* m = m_file->m_stack_stream.back();
+
+ json_object* buf = json_object_array_get_idx(m, y);
+- if (is_error(buf)) return false;
++ if (buf == nullptr)
++ return false;
+
+ m_file->push_object(buf);
+ return true;
+@@ -199,7 +200,8 @@ SerializableJsonReader00::read_sparseentry_begin_wrapped(
+
+ json_object* buf_obj
+ = json_object_array_get_idx(m, y);
+- if (is_error(buf_obj)) return false;
++ if (buf_obj == nullptr)
++ return false;
+ if (!json_object_is_type(buf_obj, json_type_object)) return false;
+
+ json_object* buf;
+--
+2.20.0
+
diff --git a/PKGBUILD b/PKGBUILD
index b0e1a25430db..e907896fd2a3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,80 @@
-# Maintainer: Zdeněk Janeček <jan.zdenek@gmail.com>
+# Maintainer: Christian Pfeiffer <xpipe at hotmail dot de>
pkgname=shogun
-pkgver=4.0.0
-pkgrel=2
-pkgdesc="Shogun - A Large Scale Machine Learning Toolbox with the python interface"
-arch=('i686' 'x86_64')
-url="http://www.shogun-toolbox.org"
-license=('GPLv3')
-depends=('cblas' 'lapack' 'swig-git' 'python-numpy' 'libcl')
-source=(http://shogun-toolbox.org/archives/shogun/releases/4.0/sources/$pkgname-$pkgver.tar.bz2)
-md5sums=('57370e869f3b24f74ce9c7b8741000b0')
+pkgver=6.1.3
+pkgrel=1
+pkgdesc="A Large Scale Machine Learning Toolbox"
+arch=('x86_64')
+url="http://shogun.ml/"
+license=('GPL3')
+depends=('arpack' 'arprec' 'cblas' 'glpk' 'hdf5' 'lapacke' 'libxml2'
+ 'json-c' 'lua' 'nlopt' 'openblas' 'ocl-icd' 'python' 'r' 'snappy')
+makedepends=('ctags' 'doxygen' 'eigen3' 'gdb' 'opencv' 'pandoc' 'protobuf'
+ 'python-numpy' 'python-ply' 'python-sphinx' 'swig' 'rxcpp-git' 'viennacl')
+optdepends=('opencv: OpenCV support'
+ 'python-numpy: Python bindings'
+ 'python-ply: Python bindings')
+source=(https://github.com/shogun-toolbox/shogun/archive/shogun_$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 "${srcdir}/${pkgname}-${pkgver}"
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DPythonModular=ON ..
+ cd build
+
+ # Enable all dependencies, except for:
+ # Commercial ones (MOSEK, CPLEX)
+ # Java - requires JBlas, which isn't packaged
+ # Octave - doesn't work with Octave 4.4
+ # Perl - apparently broken
+ # Ruby - requires RubyNArray, which isn't packaged
+ # Requires OpenBLAS, because their CMake can't work with libblas.so, only
+ # ATLAS, OpenBLAS and Intel MKL.
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_ARPREC=ON \
+ -DBUILD_EXAMPLES=OFF -DBUILD_META_EXAMPLES=OFF \
+ -DENABLE_ARPACK=ON -DENABLE_BZIP2=ON \
+ -DENABLE_COLPACK=OFF -DENABLE_VIENNACL=ON \
+ -DENABLE_EIGEN_LAPACK=ON \
+ -DENABLE_CPLEX=OFF -DENABLE_MOSEK=OFF \
+ -DENABLE_NLOPT=ON -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 \
+ -DVIENNACL_WITH_OPENCL=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" \
+ "${srcdir}/${pkgname}-${pkgname}_${pkgver}"
+
+ make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}/build"
- make DESTDIR="$pkgdir/" install
-}
+ 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
+}