summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4f81b0cd5a90419d861d40ea71a4c51de16476b (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
# Maintainer: Scott Cheng <aur@chengscott.io>
# Contributor: AchmadFathoni <fathoni.id@gmail.com>

pkgname=xgboost
pkgver=2.0.3
pkgrel=1
pkgdesc="An optimized distributed gradient boosting library"
arch=('x86_64')
url="https://github.com/dmlc/xgboost"
license=('Apache')
depends=(gcc-libs glibc)
makedepends=(cmake cuda git nccl)
source=("$pkgname"::"git+$url#tag=v${pkgver}"
        "tuple.patch")
sha256sums=('SKIP'
            'dc7a2fa0b59a8cb8a92c4ba7d0dc923c8a439d15e9ed9510b45d1c3e0e09fb77')

prepare() {
    cd "${pkgname}"
    git submodule update --init --recursive
    # https://github.com/NVIDIA/cccl/issues/1519
    git apply "${srcdir}/tuple.patch"
}

build() {
    cmake \
        -B build \
        -D CMAKE_BUILD_TYPE=Release \
        -D CMAKE_INSTALL_PREFIX=/usr \
        -D USE_CUDA=ON \
        -D USE_NCCL=ON \
        -S "${srcdir}/${pkgname}"
    cmake --build build -j
}

package() {
    DESTDIR="${pkgdir}" cmake --install build
}