summaryrefslogtreecommitdiff
path: root/extra/webkit2gtk/PKGBUILD
blob: 4c4fb0aabaac04aa480a4015c2d74142d14cc0b2 (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
# disable SSE2 on 486 and 686
source_i486+=('webkitgtk-2.32.0-no-sse2.arch32.patch')
source_i686+=('webkitgtk-2.32.0-no-sse2.arch32.patch')
sha256sums_i486+=('11f3d9cd6d36db290fd725f57530fb6ea398bb61fcf2575a77154d7009c1718a')
sha256sums_i686+=('11f3d9cd6d36db290fd725f57530fb6ea398bb61fcf2575a77154d7009c1718a')

if [ "${CARCH}" != "pentium4" ]; then
  eval "$(
    declare -f prepare | \
      sed '
        /cd.*/a for _p in \"$srcdir\"\/*.arch32.patch; do patch -p1 -i \"$_p\"; done
      '
  )"	
fi

# do not build JIT code on non-pentium4 (breaks in micro-optimizations)
eval "$(
  declare -f build | \
    sed '
      /cmake --build build/ ! {
        /^\s*cmake / {
          h
          s/^.*$/[ "${CARCH}" != pentium4 ] || \0/
          p
          g
          s/^\s*cmake /[ "${CARCH}" = pentium4 ] || \0-DENABLE_JIT=OFF -DENABLE_C_LOOP=ON -DENABLE_SAMPLING_PROFILER=OFF /
        }
      }
    '
)"