74 lines
2.1 KiB
Bash
74 lines
2.1 KiB
Bash
# Template file for 'opencv4'
|
|
pkgname=opencv4
|
|
version=4.2.0
|
|
revision=1
|
|
wrksrc=opencv-${version}
|
|
build_style=cmake
|
|
configure_args="-DENABLE_PRECOMPILED_HEADERS=OFF -DWITH_OPENMP=ON -DWITH_OPENCL=ON
|
|
-DOPENCV_GENERATE_PKGCONFIG=YES
|
|
-DWITH_EIGEN=ON -DENABLE_CXX11=ON -DOPENCV_SKIP_PYTHON_LOADER=ON
|
|
-DOPENCV_PYTHON3_INSTALL_PATH=${py3_sitelib}
|
|
-DOPENCV_PYTHON_INSTALL_PATH=${py2_sitelib}
|
|
-DOPENCV_EXTRA_MODULES_PATH=${XBPS_BUILDDIR}/opencv_contrib-${version}/modules
|
|
-DBUILD_opencv_rgbd=OFF"
|
|
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, version 4.x"
|
|
maintainer="Hazel Levine <rose.hazel@protonmail.ch>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://opencv.org"
|
|
distfiles="https://github.com/opencv/opencv/archive/${version}.tar.gz
|
|
https://github.com/opencv/opencv_contrib/archive/${version}.tar.gz>contrib.tar.gz"
|
|
checksum="9ccb2192d7e8c03c58fee07051364d94ed7599363f3b0dce1c5e6cc11c1bb0ec
|
|
8a6b5661611d89baa59a26eb7ccf4abb3e55d73f99bb52d8f7c32265c8a43020"
|
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
makedepends+=" libatomic-devel"
|
|
fi
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libopencv4_package() {
|
|
short_desc+=" - library files"
|
|
pkg_install() {
|
|
vmove usr/lib/*.so.*
|
|
}
|
|
}
|
|
|
|
libopencv4-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="libopencv4>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/lib/*.so
|
|
vmove usr/share/opencv4
|
|
}
|
|
}
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
# because python-numpy cannot be cross compiled
|
|
hostmakedepends+=" python-devel python3-devel"
|
|
makedepends+=" python-numpy python3-numpy"
|
|
|
|
libopencv4-python_package() {
|
|
short_desc+=" - Python2 bindings"
|
|
depends="python-numpy"
|
|
pkg_install() {
|
|
vmove usr/lib/python2.7
|
|
}
|
|
}
|
|
|
|
libopencv4-python3_package() {
|
|
short_desc+=" - Python3 bindings"
|
|
depends="python3-numpy"
|
|
pkg_install() {
|
|
vmove usr/lib/python3*
|
|
}
|
|
}
|
|
fi
|