void-packages/srcpkgs/opencv/template

64 lines
1.5 KiB
Bash

# Template file for 'opencv'
pkgname=opencv
version=3.3.0
revision=1
build_style=cmake
configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON
-DWITH_OPENCL=ON -DENABLE_CXX11=ON"
hostmakedepends="pkg-config eigen"
makedepends="ffmpeg-devel libpng-devel libjpeg-turbo-devel tiff-devel
jasper-devel ocl-icd-devel libgomp-devel libopenexr-devel gtk+3-devel
libgphoto2-devel gst-plugins-base1-devel openblas-devel"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://opencv.org"
license="BSD"
short_desc="Computer vision and machine learning software library"
distfiles="https://github.com/opencv/${pkgname}/archive/${version}.tar.gz"
checksum=95029eb5578af3b20b8c7f8f6f59db1b827c2d5aaaa74b6becb1de647cbdda5a
post_install() {
vlicense LICENSE
}
libopencv_package() {
short_desc+=" - library files"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libopencv-devel_package() {
short_desc+=" - development files"
depends="libopencv>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/share/OpenCV
}
}
if [ -z "$CROSS_BUILD" ]; then
# because python-numpy cannot be cross compiled
hostmakedepends+=" python-devel python3-devel"
makedepends+=" python-numpy python3-numpy"
libopencv-python_package() {
short_desc+=" - Python bindings"
pkg_install() {
mkdir -p ${DESTDIR}/usr/lib/python2.7
vmove usr/lib/python2.7
}
}
libopencv-python3_package() {
short_desc+=" - Python3 bindings"
pkg_install() {
mkdir -p ${DESTDIR}/usr/lib/python3.6
vmove usr/lib/python3.6
}
}
fi