blob: 0e5c8f40b598d7c4cb702e615024a8389f7ed27c (
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
|
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_{4,5}} pypy{,3} )
inherit distutils-r1
DESCRIPTION="Scalable, Portable and Distributed Gradient Boosting."
HOMEPAGE="https://github.com/dmlc/xgboost"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="git://github.com/dmlc/xgboost.git"
inherit git-r3
else
EGIT_COMMIT=v${PV}
SRC_URI="https://github.com/dmlc/xgboost/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
inherit vcs-snapshot
fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+python static-libs"
DEPEND=">=sys-devel/gcc-4.6"
RDEPEND="${DEPEND}
python? (
${PYTHON_DEPS}
dev-python/numpy[${PYTHON_USEDEP}]
sci-libs/scipy[${PYTHON_USEDEP}]
)
"
src_compile() {
default
use python && cd python-package && distutils-r1_src_compile
}
src_install() {
insinto /usr/include
doins -r {dmlc-core/,rabit/,}include/*
dolib.so lib/libxgboost.so
use static-libs && dolib.a lib/libxgboost.a
dobin xgboost
use python && cd python-package && distutils-r1_src_install
}
|