Last active
May 28, 2017 17:48
-
-
Save tka/f0c941cbb259629c0ec569242783c4f7 to your computer and use it in GitHub Desktop.
opencv-contrib-3.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cp opencv-3.2.0/3rdparty/ippicv/ippicv_lnx/lib/intel64/libippicv.a /usr/local/lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Andrew Crerar <andrew (at) crerar (dot) io> | |
# Contributor: Valentin Churavy <[email protected]> | |
# Contributor: Romain Reignier <[email protected]> | |
# Contributor: Fabien Dubosson <[email protected]> | |
# Contributor: David Manouchehri <[email protected]> | |
# Contributor: CHEN Xing <[email protected]> | |
# Contributor: Martin Imobersteg <[email protected]> | |
# Contributor: Artyom Smirnov <[email protected]> | |
# Also largely inspired by `opencv` in extra, so including contributors too: | |
# Contributor: Ray Rashif <[email protected]> | |
# Contributor: Tobias Powalowski <[email protected]> | |
_name=opencv | |
pkgname="${_name}-git" | |
pkgver=3.2.0.r709.g89fcd6d8a | |
pkgrel=1 | |
pkgdesc="Open Source Computer Vision Library" | |
url="http://opencv.org/" | |
license=('BSD') | |
arch=('i686' 'x86_64') | |
depends=('intel-tbb' 'openexr' 'xine-lib' 'libdc1394' 'gtkglext') | |
makedepends=('git' 'cmake' 'python2-numpy' 'python-numpy' 'mesa' 'eigen') | |
optdepends=('opencv-samples' | |
'eigen' | |
'opencl-icd-loader: For coding with OpenCL' | |
'python-numpy: Python 3 interface' | |
'python2-numpy: Python 2 interface') | |
conflicts=('opencv' 'opencv-git') | |
provides=("${_name}=${pkgver}") | |
source=('git+https://github.com/opencv/opencv.git' | |
'git+https://github.com/opencv/opencv_contrib.git') | |
sha512sums=('SKIP' | |
'SKIP') | |
_cmakeopts=('-D WITH_OPENCL=OFF' | |
'-D WITH_OPENGL=ON' | |
'-D WITH_TBB=ON' | |
'-D WITH_XINE=ON' | |
'-D BUILD_WITH_DEBUG_INFO=OFF' | |
'-D BUILD_TESTS=OFF' | |
'-D BUILD_PERF_TESTS=OFF' | |
'-D BUILD_EXAMPLES=ON' | |
'-D INSTALL_C_EXAMPLES=ON' | |
'-D INSTALL_PYTHON_EXAMPLES=ON' | |
'-D CMAKE_BUILD_TYPE=Release' | |
'-D CMAKE_INSTALL_PREFIX=/usr' | |
'-D ENABLE_FAST_MATH=1' | |
'-D WITH_CUBLAS=1' | |
'-D CMAKE_SKIP_RPATH=ON' | |
'-DCUDA_ARCH_BIN=5.2' | |
'-DCUDA_ARCH_PTX=5.2') | |
# SSE only available from Pentium 3 onwards (i686 is way older) | |
[[ "$CARCH" = 'i686' ]] && \ | |
_cmakeopts+=('-D ENABLE_SSE=OFF' | |
'-D ENABLE_SSE2=OFF' | |
'-D ENABLE_SSE3=OFF') | |
pkgver() { | |
cd "${srcdir}/${_name}" | |
git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' | |
} | |
build() { | |
export EXTRA_NVCCFLAGS="-Xcompiler -std=c++98" | |
#export CXX=/usr/bin/g++-5 | |
#export CC=/usr/bin/gcc-5 | |
cmake ${_cmakeopts[@]} \ | |
-DOPENCV_EXTRA_MODULES_PATH="${srcdir}/opencv_contrib/modules" \ | |
-DCUDA_NVCC_FLAGS="-Xcompiler -std=c++98" \ | |
${_name} | |
make | |
} | |
package() { | |
options=('staticlibs') | |
make DESTDIR="${pkgdir}" install | |
# install LICENSE file | |
install -Dm644 "${srcdir}/${_name}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment