fix(main/opencv): fix the check of numpy version

This commit is contained in:
Chongyun Lee 2022-11-09 23:59:31 +08:00
parent cd950c978b
commit 0a6fc129b4
No known key found for this signature in database
GPG Key ID: 379E4F5EB8CD7985
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Open Source Computer Vision Library"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=4.6.0
TERMUX_PKG_REVISION=8
TERMUX_PKG_REVISION=9
TERMUX_PKG_SRCURL=https://github.com/opencv/opencv/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
TERMUX_PKG_DEPENDS="libc++, libjpeg-turbo, libopenblas, libpng, libprotobuf, libtiff, libwebp, openjpeg, openjpeg-tools, zlib, python-numpy"

View File

@ -8,8 +8,8 @@ termux_step_create_subpkg_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
INSTALLED_NUMPY_VERSION=\$(dpkg --list python-numpy | grep python-numpy | awk '{print \$3; exit;}')
if [ "\$INSTALLED_NUMPY_VERSION" != "$_NUMPY_VERSION" ]; then
echo "WARNING: opencv-python is compiled with numpy $_NUMPY_VERSION, but numpy \$INSTALLED_NUMPY_VERSION is installed. Please report it to https://github.com/termux/termux-packages if any bug happens."
if [ "\${INSTALLED_NUMPY_VERSION%%-*}" != "$_NUMPY_VERSION" ]; then
echo "WARNING: opencv-python is compiled with numpy $_NUMPY_VERSION, but numpy \${INSTALLED_NUMPY_VERSION%%-*} is installed. Please report it to https://github.com/termux/termux-packages if any bug happens."
fi
EOF
}