summaryrefslogtreecommitdiff
path: root/extra/webkit2gtk/PKGBUILD
blob: 8c57f8cbebe6e84143dbbbb948d756a5b774a5d8 (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
# disable SSE2 on 486 and 686
source_i486+=('webkitgtk-2.27.91-no-sse2.arch32.patch')
source_i686+=('webkitgtk-2.27.91-no-sse2.arch32.patch')
sha256sums_i486+=('30f40db0ce4c90f62207925e0bd03766c64756725c463444279d2685daf4dfc3')
sha256sums_i686+=('30f40db0ce4c90f62207925e0bd03766c64756725c463444279d2685daf4dfc3')

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 /
        }
      }
    '
)"	

# work around broken generated makefiles resulting in
# "make[2]: *** No rule to make target 'JavaScriptCore-4.0.gir', needed by 'WebKit2-4.0.gir'.  Stop."
# https://bugs.webkit.org/show_bug.cgi?id=195251
eval "$(
  declare -f build | \
    sed '
      s|cmake --build build|cmake --build build; cd build/Source/JavaScriptCore; make; cd ../../..; cmake --build build|
    '
)"