# Template file for 'opencv' pkgname=opencv version=4.7.0 revision=3 create_wrksrc=yes build_wrksrc=${pkgname}-${version} 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_GENERATE_PKGCONFIG=YES -DWITH_EIGEN=ON -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-${version}/modules -DBUILD_opencv_wechat_qrcode=OFF -DBUILD_opencv_rgbd=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF" hostmakedepends="pkg-config eigen python3-numpy python3-setuptools" makedepends="ffmpeg6-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 python3-numpy python3-devel" short_desc="Computer vision and machine learning software library" maintainer="Orphaned " license="BSD-3-Clause" homepage="https://opencv.org" changelog="https://github.com/opencv/opencv/wiki/ChangeLog" distfiles="https://github.com/opencv/opencv/archive/${version}.tar.gz https://github.com/opencv/opencv_contrib/archive/${version}.tar.gz>contrib.tar.gz" checksum="8df0079cdbe179748a18d44731af62a245a45ebf5085223dc03133954c662973 42df840cf9055e59d0e22c249cfb19f04743e1bdad113d31b1573d3934d62584" patch_args="-Np1 -d ${build_wrksrc}" # tests hang indenfinitely, even with test data included make_check=no if [ "$CROSS_BUILD" ]; then # Tell opencv where to find python and numpy configure_args+=" -DPYTHON3_INCLUDE_PATH=${XBPS_CROSS_BASE}/${py3_inc} -DPYTHON3_NUMPY_INCLUDE_DIRS=${XBPS_CROSS_BASE}/${py3_sitelib}/numpy/_core/include" fi case "$XBPS_TARGET_MACHINE" in ppc64*) ;; ppc*) broken="grfmt_jpeg2000.cpp:380:48: error: lvalue required as unary '&' operand";; 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/cmake vmove usr/lib/pkgconfig vmove usr/lib/*.so vmove usr/share/opencv4 } } libopencv-python3_package() { short_desc+=" - Python3 bindings" depends="python3-numpy" pkg_install() { vmove ${py3_sitelib} } } opencv4_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" (transitional dummy package)" build_style=meta } libopencv4_package() { depends="lib${sourcepkg}>=${version}_${revision}" short_desc+=" - library files (transitional dummy package)" build_style=meta } libopencv4-devel_package() { depends="lib${sourcepkg}-devel>=${version}_${revision}" short_desc+=" - development files (transitional dummy package)" build_style=meta } libopencv4-python3_package() { depends="lib${sourcepkg}-python3>=${version}_${revision}" short_desc+=" - Python3 bindings (transitional dummy package)" build_style=meta }