summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Popov2016-06-18 23:19:35 +0300
committerDmitry Popov2016-06-18 23:19:38 +0300
commit9d16efdcbe3132a549a9240eebe120adecf7776c (patch)
tree4f41bdd8df224085d89d650f7db8297fd4c98cc5
parent576c0df7e7d7d3209fccc59185d40989c8f1b77f (diff)
downloadaur-9d16efdcbe3132a549a9240eebe120adecf7776c.tar.gz
xgboost had missing include, fixed
See https://github.com/dmlc/xgboost/issues/1268 for more info This fix will be removed when upstream solves it
-rw-r--r--PKGBUILD7
-rw-r--r--xgboost_fix_missing_include.patch12
2 files changed, 17 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b31e39343d0b..ff8ac892f09d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,13 +12,15 @@ license=('APACHE')
source=('git+https://github.com/dmlc/xgboost.git'
'git+https://github.com/dmlc/dmlc-core'
'git+https://github.com/dmlc/rabit'
- 'python_no_libs.patch')
+ 'python_no_libs.patch'
+ 'xgboost_fix_missing_include.patch')
makedepends=('python2-setuptools' 'python-setuptools')
arch=('x86_64')
sha256sums=('SKIP'
'SKIP'
'SKIP'
- 'fd317b9708da75b4e2e304b5c2eacbb4b766bb38044e3a26ce55d077c2e13048')
+ 'fd317b9708da75b4e2e304b5c2eacbb4b766bb38044e3a26ce55d077c2e13048'
+ '5c22abd1a58f0b6da16687e3083a3dbbb961f30f0de359c5637cdbc1948459af')
pkgver() {
cd "${_name}"
@@ -32,6 +34,7 @@ prepare() {
git config submodule.rabit.url "${srcdir}/rabit"
git submodule update
patch -p1 < "${srcdir}/python_no_libs.patch"
+ grep -qF '<cmath>' src/tree/param.h || patch -p1 < "${srcdir}/xgboost_fix_missing_include.patch"
}
build() {
diff --git a/xgboost_fix_missing_include.patch b/xgboost_fix_missing_include.patch
new file mode 100644
index 000000000000..a10776888adc
--- /dev/null
+++ b/xgboost_fix_missing_include.patch
@@ -0,0 +1,12 @@
+diff --git a/src/tree/param.h b/src/tree/param.h
+index e9de3ac..23d0c5b 100644
+--- a/src/tree/param.h
++++ b/src/tree/param.h
+@@ -9,6 +9,7 @@
+
+ #include <vector>
+ #include <cstring>
++#include <cmath>
+
+ namespace xgboost {
+ namespace tree {