summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea979023d25da533bec06956e08875f07bd55b47 (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
# Maintainer: pingplug < aur at pingplug dot me >
# Maintainer: AdriĆ  Arrufat <swiftscythe@gmail.com>
# Contributor: perlawk

pkgname=dlib-cuda
pkgver=19.24.3
pkgrel=1
pkgdesc="A general purpose cross-platform C++ library designed using contract programming and modern C++ techniques"
arch=('x86_64')
url="http://dlib.net"
license=('custom')
depends=('cblas'
         'cuda'
         'cudnn'
         'lapack'
         'blas'
         'libjpeg-turbo'
         'libpng'
         'libx11')
provides=('dlib')
conflicts=('dlib')
optdepends=('giflib: for GIF support'
            'libjxl: for JPEG XL support'
            'libwebp: for WebP support'
            'sqlite: for sqlite support')
makedepends=('cmake' 'ninja')
source=("https://codeload.github.com/davisking/dlib/tar.gz/refs/tags/v${pkgver}")
sha256sums=('4b1f28e76020775334e67cc348ceb26a4f5161df6659848be0d3b300406400a3')

build() {
    cd "${srcdir}"
    mkdir -p build && cd build
    cmake -GNinja \
        -DCMAKE_INSTALL_PREFIX:PATH=/usr \
        -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
        -DBUILD_SHARED_LIBS=ON \
        -DCMAKE_BUILD_TYPE=Release \
        -DUSE_AVX_INSTRUCTIONS=ON \
        -DDLIB_USE_CUDA=ON \
        "../dlib-${pkgver}"
    ninja ${MAKEFLAGS:--j1}
}

package() {
    cd "${srcdir}/build"
    DESTDIR=${pkgdir} ninja install
    install -Dm644 "../dlib-${pkgver}/dlib/LICENSE.txt" "${pkgdir}/usr/share/licenses/dlib/LICENSE"
    # remove redundant external libraries
    rm -r "${pkgdir}/usr/include/dlib/external"
}