From 2fbfb64135192ced886d5a7c5d8066d89a2fdcb7 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 11 Feb 2022 21:04:10 +0100 Subject: extra/opencv: fixed SSE2/SSE switches, fixed -latomic for i486, removed cuddn/cuda --- extra/opencv/PKGBUILD | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) (limited to 'extra/opencv/PKGBUILD') diff --git a/extra/opencv/PKGBUILD b/extra/opencv/PKGBUILD index 41d30c74..3ae856c0 100644 --- a/extra/opencv/PKGBUILD +++ b/extra/opencv/PKGBUILD @@ -1,6 +1,3 @@ -# temporary workaround for FS#70653 -sha256sums[0]='ae258ed50aa039279c3d36afdea5c6ecf762515836b27871a8957c610d0424f8' - # Qt6 (lrelease) is linked against icu68, icu 69 is current version makedepends+=(icu68) @@ -8,3 +5,47 @@ makedepends+=(icu68) if [ "$CARCH" = 'i486' ]; then makedepends=(${makedepends[@]//vtk/}) fi + +# no cuda +makedepends=(${makedepends[@]//cudnn/}) + +eval "$( + declare -f build | \ + declare -f package_opencv-cuda | \ + sed ' + s/cudnn//g + ' +)" + +# disable SSE2 on i686 and i486 +if [ "$CARCH" = 'i486' -o "$CARCH" = 'i686' ]; then + eval "$( + declare -f build | \ + sed ' + s/-DCPU_BASELINE_REQUIRE=SSE2/-DCPU_BASELINE_DISABLE=SSE2/g + ' + )" +fi + +# disable SSE on i486 +if [ "$CARCH" = 'i486' ]; then + eval "$( + declare -f build | \ + sed ' + /_opts=/ a \ + _opts+=" -DCPU_BASELINE_DISABLE=SSE" + ' + )" +fi + +# -latomic on i486 +if [ "$CARCH" == 'i486' ]; then + eval "$( + declare -f build | \ + sed ' + /_opts=/ a \ + _opts+=" -DCMAKE_CXX_STANDARD_LIBRARIES=-latomic" + ' + )" +fi + -- cgit v1.2.3-70-g09d2