Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/opencv/PKGBUILD
blob: 6b8e307dfa3655e27afc013f0d0932c0b73bba03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Qt6 (lrelease) is linked against icu68, icu 69 is current version
makedepends+=(icu68)

# no vtk yet on i486
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

# breaking the cycle with gstreamer on i486
depends=(${depends[@]//gst-plugins-base/})
depends_i686+=(gst-plugins-base)
depends_pentium4=("${depends_i686[@]}")