summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-02-11 21:04:10 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2022-02-11 21:04:10 +0100
commit2fbfb64135192ced886d5a7c5d8066d89a2fdcb7 (patch)
treeffd37e9214fec2bb618fe316659e3e6446eb558c /extra
parent2027c709e0ffc06f2e20660dce7100a0443ca10a (diff)
downloadpackages-2fbfb64135192ced886d5a7c5d8066d89a2fdcb7.tar.xz
extra/opencv: fixed SSE2/SSE switches, fixed -latomic for i486, removed cuddn/cuda
Diffstat (limited to 'extra')
-rw-r--r--extra/opencv/PKGBUILD47
1 files changed, 44 insertions, 3 deletions
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
+