19.24.2 PKGBUILD
this version imporve the recognition speed, and can build under py3.11
# Maintainer: Jingbei Li <i@jingbei.li>
# Contributor: Lev Velykoivanenko <velykoivanenko dot lev at gmail dot com>
# Contributor: Flávio Zavan <flavio dot zavan at gmail dot com>
# Contributor: pingplug
# Contributor: perlawk
# Contributor: xsmile
pkgbase=python-dlib
pkgname=('python-dlib')
##pkgname+=('python-dlib-cuda')
_pkgname=dlib
pkgver=19.24.2
pkgrel=1
pkgdesc="Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques."
arch=('x86_64')
url="http://www.dlib.net/"
license=('Boost')
depends=('cblas' 'giflib' 'lapack' 'libjpeg-turbo' 'libpng' 'libx11')
optdepends=('sqlite')
##optdepends+=('cuda' 'cudnn' 'ccache-ext')
makedepends=(${optdepends[@]} 'cmake' 'boost' 'python-setuptools')
#source=("$url/files/${_pkgname}-${pkgver}.tar.bz2")
source=("https://github.com/davisking/dlib/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('0f5c7e3de6316a513635052c5f0a16a84e1cef26a7d233bf00c21348462b6d6f')
##options=(!lto)
##prepare() {
## cd "$srcdir/"
## cp -a "${_pkgname}-${pkgver}" "${_pkgname}-${pkgver}-cuda"
##}
build(){
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py build --no DLIB_USE_CUDA
## cuda_flags='--set CUDA_HOST_COMPILER=/opt/cuda/bin/gcc --set CUDA_NVCC_EXECUTABLE=/usr/lib/ccache/bin/nvcc-ccache --set CUDA_HOST_COMPILER=/opt/cuda/bin/gcc'
## cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
## python setup.py build $cuda_flags
}
package_python-dlib(){
depends+=('python')
cd "${srcdir}/${_pkgname}-${pkgver}"
python setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
}
package_python-dlib-cuda(){
depends+=('cuda' 'cudnn' 'python')
provides=('python-dlib')
conflicts=('python-dlib')
cd "${srcdir}/${_pkgname}-${pkgver}-cuda"
python setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
}
Pinned Comments
petronny commented on 2024-03-30 13:11 (UTC) (edited on 2024-03-30 13:13 (UTC) by petronny)
Set
_build_cpu
and_build_cuda
to 1 and 0 to build or not build the CPU or CUDA version.If
options=(!lto)
has no effect, please check if it's still enabled in/etc/makepkg.conf
.petronny commented on 2023-11-28 04:57 (UTC)
Prebuilt binaries of this package can be found in arch4edu.