68 lines
1.7 KiB
Bash
68 lines
1.7 KiB
Bash
# Template file for 'opencv'
|
|
pkgname=opencv
|
|
version=3.4.8
|
|
revision=2
|
|
build_style=cmake
|
|
configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON
|
|
-DWITH_OPENCL=ON -DENABLE_CXX11=ON -DOPENCV_SKIP_PYTHON_LOADER=ON
|
|
-DOPENCV_PYTHON3_INSTALL_PATH=${py3_sitelib}
|
|
-DOPENCV_PYTHON_INSTALL_PATH=${py2_sitelib}"
|
|
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"
|
|
short_desc="Computer vision and machine learning software library"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://opencv.org"
|
|
distfiles="https://github.com/opencv/${pkgname}/archive/${version}.tar.gz"
|
|
checksum=f0901648a1db3dc3af30e65082665921dbe998673137380450bdd91e8251b567
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv[56]*|mips*) makedepends+=" libatomic-devel";;
|
|
esac
|
|
|
|
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+=" - Python2 bindings"
|
|
depends="python-numpy"
|
|
pkg_install() {
|
|
vmove usr/lib/python2.7
|
|
}
|
|
}
|
|
|
|
libopencv-python3_package() {
|
|
short_desc+=" - Python3 bindings"
|
|
depends="python3-numpy"
|
|
pkg_install() {
|
|
vmove usr/lib/python3*
|
|
}
|
|
}
|
|
fi
|