summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Velykoivanenko2018-03-16 11:55:25 +0100
committerLev Velykoivanenko2018-03-16 11:55:25 +0100
commit93026607dda672c93cdf0e999d18e1a5c5d5c0ff (patch)
treeb799ff0b28f495122d4b94a383efcbe64891db90
parentf4f35311cb0e5ee923d2b1779ac9b743f7cc50a4 (diff)
downloadaur-93026607dda672c93cdf0e999d18e1a5c5d5c0ff.tar.gz
Fix PKGBUILD.
Update to dlib 19.9. Change maintainer.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD49
2 files changed, 39 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 50e0e8c3fdf..f17a7668869 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-dlib-cuda
pkgdesc = Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques.
- pkgver = 19.7
+ pkgver = 19.9
pkgrel = 1
url = http://www.dlib.net/
arch = any
@@ -16,7 +16,8 @@ pkgbase = python-dlib-cuda
optdepends = libjpeg-turbo: for JPEG support
optdepends = libpng: for PNG support
optdepends = sqlite: for sqlite support
- source = http://dlib.net/files/dlib-19.7.tar.bz2
+ source = http://dlib.net/files/dlib-19.9.tar.bz2
+ md5sums = 4a3868a1e88721b68ccfb0567eaac87b
pkgname = python-dlib-cuda
depends = python
diff --git a/PKGBUILD b/PKGBUILD
index 2634427f2e8..f2707106b36 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,13 @@
-# Maintainer: Adam Gradzki <adam at mm dot st>
+# Maintainer: Lev Velykoivanenko <velykoivanenko dot lev at gmail dot com>
+# Contributor: Adam Gradzki <adam at mm dot st> (previous maintainer)
# Contributor: Flávio Zavan <flavio dot zavan at gmail dot com>
# Contributor: pingplug
# Contributor: perlawk
# Contributor: xsmile
pkgname=('python-dlib-cuda' 'python2-dlib-cuda')
-pkgver=19.7
+_pkgname='dlib'
+pkgver=19.9
pkgrel=1
pkgdesc="Dlib is a general purpose cross-platform C++ library designed using contract programming and modern C++ techniques."
arch=('any')
@@ -17,30 +19,51 @@ optdepends=('cblas: for BLAS support'
'libjpeg-turbo: for JPEG support'
'libpng: for PNG support'
'sqlite: for sqlite support')
-source=('http://dlib.net/files/dlib-19.7.tar.bz2')
-md5=('119c17eda1075f6cfb3f8cd21f11f53b')
+source=('http://dlib.net/files/dlib-19.9.tar.bz2')
+md5sums=('4a3868a1e88721b68ccfb0567eaac87b')
-avx_available=''
+# Detecting whether certain cpu optimisations can be made
+avx_available=()
if grep -q avx /proc/cpuinfo; then
- avx_available='--yes USE_AVX_INSTRUCTIONS'
+ avx_available=( '--yes' 'USE_AVX_INSTRUCTIONS' )
fi
-build(){
+sse2_available=()
+if grep -q sse2 /proc/cpuinfo; then
+ sse2_available=( '--yes' 'USE_SSE2_INSTRUCTIONS' )
+fi
+
+sse4_available=()
+if grep -q sse4 /proc/cpuinfo; then
+ sse4_available=( '--yes' 'USE_SSE4_INSTRUCTIONS' )
+fi
+
+build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- python setup.py build $avx_available
- CUDNN_INCLUDE_DIR="/opt/cuda/include" CUDNN_LIBRARY_DIR="/opt/cuda/lib64" CC=`which gcc-6` CXX=`which g++-6` python2 setup.py build $avx_available
+
+ # Exporting compiler environment variables
+ # This is necessary to get cuda support
+ export CC=`which gcc-6`
+ export CXX=`which g++-6`
+
+ # Compiling for Python 3
+ python setup.py build -j $(nproc) "${avx_available[@]}" "${sse2_available[@]}" "${sse4_available[@]}"
+
+ # Compiling for Python 2
+ python2 setup.py build "${avx_available[@]}" "${sse2_available[@]}" "${sse4_available[@]}"
}
-package_python-dlib-cuda(){
+package_python-dlib-cuda() {
depends=('python')
cd "${srcdir}/${_pkgname}-${pkgver}"
- CUDNN_INCLUDE_DIR="/opt/cuda/include" CUDNN_LIBRARY_DIR="/opt/cuda/lib64" CC=`which gcc-6` CXX=`which g++-6` python setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
+ python setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
}
-package_python2-dlib-cuda(){
+package_python2-dlib-cuda() {
depends=('python2')
cd "${srcdir}/${_pkgname}-${pkgver}"
- CUDNN_INCLUDE_DIR="/opt/cuda/include" CUDNN_LIBRARY_DIR="/opt/cuda/lib64" CC=`which gcc-6` CXX=`which g++-6` python2 setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
+ python2 setup.py install --skip-build --prefix=/usr --root="$pkgdir" --optimize=1
}
+