summaryrefslogtreecommitdiff
blob: 8745b3f380a9b5d0b992522afc2d234a93eba360 (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="4a8d63b6c8711fb839c71e26c659936252df1eb5"
    EGIT_REPO_URI="git://github.com/dmlc/xgboost.git"
    KEYWORDS="~amd64 ~x86"
    inherit git-r3
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
}